From 6ced304143b7af5cb92ff1fa15142990e066894e Mon Sep 17 00:00:00 2001 From: lin <648540858@qq.com> Date: Tue, 4 Nov 2025 11:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B8=E5=85=B3BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../media/zlm/ZLMMediaNodeServerService.java | 10 ++++- web/src/utils/request.js | 42 ++++++++++--------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java index a6c53f517..5949848a7 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java @@ -636,7 +636,15 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService { param.put("callId", callId); } if (mediaInfo != null && !ObjectUtils.isEmpty(mediaInfo.getOriginTypeStr())) { - param.put("originTypeStr", mediaInfo.getOriginTypeStr()); + if (!ObjectUtils.isEmpty(mediaInfo.getOriginTypeStr())) { + param.put("originTypeStr", mediaInfo.getOriginTypeStr()); + } + if (!ObjectUtils.isEmpty(mediaInfo.getVideoCodec())) { + param.put("videoCodec", mediaInfo.getVideoCodec()); + } + if (!ObjectUtils.isEmpty(mediaInfo.getAudioCodec())) { + param.put("audioCodec", mediaInfo.getAudioCodec()); + } } StringBuilder callIdParamBuilder = new StringBuilder(); if (!param.isEmpty()) { diff --git a/web/src/utils/request.js b/web/src/utils/request.js index e07f13935..7f7ce547a 100644 --- a/web/src/utils/request.js +++ b/web/src/utils/request.js @@ -56,27 +56,29 @@ service.interceptors.response.use( }, error => { console.log(error) // for debug - if (error.response.status === 401 && !showLoginConfirm && store.getters.showConfirmBoxForLoginLose) { - // to re-login - showLoginConfirm = true - MessageBox.confirm('登录已经到期, 是否重新登录', '登录确认', { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - store.dispatch('user/resetToken').then(() => { - location.reload() - }) - }).catch(() => { - store.dispatch('user/closeConfirmBoxForLoginLose') - Message.warning({ - type: 'warning', - message: '登录过期提示已经关闭,请注销后重新登录' - }) - // 清除token, 后续请求不再继续 + if (error.response.status === 401) { + if (!showLoginConfirm && store.getters.showConfirmBoxForLoginLose) { + // to re-login + showLoginConfirm = true + MessageBox.confirm('登录已经到期, 是否重新登录', '登录确认', { + confirmButtonText: '重新登录', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + store.dispatch('user/resetToken').then(() => { + location.reload() + }) + }).catch(() => { + store.dispatch('user/closeConfirmBoxForLoginLose') + Message.warning({ + type: 'warning', + message: '登录过期提示已经关闭,请注销后重新登录' + }) + // 清除token, 后续请求不再继续 - }) - } else { + }) + } + }else { if (!store.getters.showConfirmBoxForLoginLose) { return }