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 | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/web-app/src/components/common/OutboundCallWidget.jsx b/web-app/src/components/common/OutboundCallWidget.jsx
index c10d531..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]);
@@ -555,14 +563,14 @@
{call.errorCode > 0 ? (
// 失败任务显示
<span>
- {call.perClassName || '联系人'}
+ {call.perTypeName || '联系人'}
{call.trueName && `(${call.trueName})`}:
{call.message}
</span>
) : (
- // 成功任务显示
+ // 成功任务显示 - 使用 perTypeName 字段(申请方当事人/被申请方当事人)
<span>
- 正在与{call.perClassName || '申请方'}({call.trueName || call.personId})电话沟通中...
+ 正在与{call.perTypeName || '申请方当事人'}({call.trueName || call.personId})电话沟通中...
</span>
)}
</div>
--
Gitblit v1.8.0