From 22ae69256f66f4e413f577a32732e9de200e73e5 Mon Sep 17 00:00:00 2001
From: tony.cheng <chengmingwei_1984122@126.com>
Date: Fri, 13 Mar 2026 09:57:19 +0800
Subject: [PATCH] feat: 实现URL auth_token 转换为 Authorization 请求头传递
---
web-app/src/components/common/OutboundCallWidget.jsx | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/web-app/src/components/common/OutboundCallWidget.jsx b/web-app/src/components/common/OutboundCallWidget.jsx
index 0bfa279..df9ffe7 100644
--- a/web-app/src/components/common/OutboundCallWidget.jsx
+++ b/web-app/src/components/common/OutboundCallWidget.jsx
@@ -341,9 +341,17 @@
// 设置轮询定时器(10秒间隔)
const interval = setInterval(fetchCallStatus, POLL_INTERVAL);
+ // 监听外呼任务更新事件(立即刷新)
+ const handleOutboundJobsUpdated = () => {
+ console.log('收到外呼任务更新事件,立即刷新');
+ fetchCallStatus();
+ };
+ window.addEventListener('outbound-jobs-updated', handleOutboundJobsUpdated);
+
// 清理函数
return () => {
clearInterval(interval);
+ window.removeEventListener('outbound-jobs-updated', handleOutboundJobsUpdated);
isMountedRef.current = false;
};
}, [fetchCallStatus]);
--
Gitblit v1.8.0