添加日志信息处理

master
于肖磊 2026-01-06 16:53:56 +08:00
parent 5eb4b9dbea
commit cd33eb913f
2 changed files with 10 additions and 5 deletions

View File

@ -541,13 +541,16 @@
this.is_socket_error = true;
// 30
if ((this.reconnect_count + 1) < 30) {
const _this = this;
setTimeout(() => {
this.is_socket_error = true;
this.socket_error_content = `${this.reconnect_count + 1}次连接失败`;
_this.is_socket_error = true;
_this.socket_error_content = `${_this.reconnect_count + 1}次连接失败`;
console.log(`${_this.reconnect_count + 1}次连接失败`);
setTimeout(() => {
//
this.reconnect_count++;
this.socket_connect();
_this.reconnect_count++;
_this.socket_connect();
console.log(`${_this.reconnect_count + 1}次连接`);
}, 1000); // 10
}, 1000); // 10
} else {
@ -745,12 +748,13 @@
clearInterval(this.pull_live_room_info_timer);
this.pull_live_room_info_timer = null;
}
console.log('立即获取直播间数据');
//
this.socket_send('live-room-info');
// 30
this.pull_live_room_info_timer = setInterval(() => {
console.log('定时获取直播间数据');
this.socket_send('live-room-info');
}, this.live_room_info_timing_interval_time * 1000);
},

View File

@ -211,6 +211,7 @@ export default {
const _this = this;
// 延迟3秒后尝试重新连接
this.ended_timer = setTimeout(() => {
console.log('视频重连次数' + _this.retry_count);
// 在定时结束后尝试重新连接
if (_this.$refs.liveVideo) {
_this.$refs.liveVideo.reload_video();