update pay function
This commit is contained in:
@@ -331,6 +331,22 @@ const AgentChatV4 = () => {
|
||||
return () => window.removeEventListener('resize', handleResize);
|
||||
}, []);
|
||||
|
||||
// 在 AgentChat 页面隐藏 Bytedesk 客服插件(避免遮挡页面)
|
||||
useEffect(() => {
|
||||
// 隐藏 Bytedesk
|
||||
const bytedeskElements = document.querySelectorAll('[class*="bytedesk"], [id*="bytedesk"], [class*="BytedeskWeb"]');
|
||||
bytedeskElements.forEach(el => {
|
||||
if (el) el.style.display = 'none';
|
||||
});
|
||||
|
||||
// 组件卸载时恢复显示
|
||||
return () => {
|
||||
bytedeskElements.forEach(el => {
|
||||
if (el) el.style.display = '';
|
||||
});
|
||||
};
|
||||
}, []);
|
||||
|
||||
const addMessage = (message) => {
|
||||
setMessages((prev) => [...prev, { ...message, id: Date.now() }]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user