Compare commits

..

18 Commits

Author SHA1 Message Date
zdl
9fe65f6c23 feat: 参数调整 2025-11-12 14:27:32 +08:00
zdl
7fa4a8efbc feat:修复了图片 404 错误 2025-11-12 13:51:07 +08:00
zdl
44ae479615 feat: 调整链接 2025-11-12 13:41:33 +08:00
zdl
e32a500247 fix(bytedesk): 修复路径配置,统一使用 /bytedesk/ 前缀
修复 Bytedesk 客服系统路径不匹配问题,统一前端、CRACO 和 Nginx 配置。

## 问题
- 前端配置使用 `/bytedesk-api/` 路径
- 生产 Nginx 配置使用 `/bytedesk/` 路径
- 路径不匹配导致请求 404 或被 React Router 拦截

## 解决方案
统一使用 `/bytedesk/` 路径前缀,避免 React Router 冲突

## 代码变更

### src/bytedesk-integration/config/bytedesk.config.js
- `htmlUrl`: `/bytedesk-api/chat/` → `/bytedesk/chat/`
- `apiUrl`: `/bytedesk-api/` → `/bytedesk/`
- 更新配置注释,说明代理架构

### craco.config.js
- 代理前缀:`/bytedesk-api` → `/bytedesk`
- 删除冗余代理:`/chat` 和 `/config`(Nginx 统一处理)
- 简化配置,减少代理规则数量

## 请求链路
```
浏览器 → /bytedesk/chat/
    ↓
CRACO/Nginx → location /bytedesk/ {}
    ↓
代理转发 → http://43.143.189.195/chat/ Bytedesk 聊天窗口
```

## 优势
-  前端、CRACO、Nginx 路径统一
-  避免 React Router 冲突
-  简化代理配置
-  无需修改服务器 Nginx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 13:30:39 +08:00
zdl
5524826edd feat: 切换iframe域名 2025-11-12 13:16:11 +08:00
zdl
19b03b6c91 feat: 调整配置 2025-11-12 11:54:18 +08:00
zdl
b07cb8ab51 feat: 修改 bytedesk.config.js,改为使用相对路径和动态域名 2025-11-12 11:26:05 +08:00
zdl
a1c952c619 Merge branch 'feature_bugfix/251110_event' of https://git.valuefrontier.cn/vf/vf_react into feature_bugfix/251110_event
* 'feature_bugfix/251110_event' of https://git.valuefrontier.cn/vf/vf_react:
  feat: 调整环境配置
2025-11-12 11:04:08 +08:00
zdl
fb4a18c8ec feat: 调整环境配置 2025-11-12 11:03:37 +08:00
zdl
1e9484e471 feat: 调整环境配置 2025-11-12 11:01:44 +08:00
zdl
5c60450ba1 feat: 配置调整 2025-11-12 10:43:06 +08:00
zdl
d2b6d891b2 feat: 添加UI 2025-11-11 22:47:27 +08:00
zdl
261a7bf329 fix(community): 修复 React Hooks 顺序错误
将 Alert 组件中的 useColorModeValue Hook 调用提取到组件顶层,
避免在条件渲染中调用 Hook 导致的顺序变化问题。

## 问题
- useColorModeValue 在 showNotificationBanner 条件渲染内部调用
- 当条件状态变化时,Hooks 调用顺序发生改变
- 触发 React 警告:Hooks 顺序改变(第 75 个 Hook 从 undefined 变为 useContext)

## 解决方案
- 将 alertBgColor 和 alertBorderColor 提取到组件顶层
- 确保所有 Hooks 在每次渲染时以相同顺序调用
- 符合 React Hooks 规则:只在顶层调用 Hooks

## 变更文件
src/views/Community/index.js:
- 新增 alertBgColor 常量(第 47 行)
- 新增 alertBorderColor 常量(第 48 行)
- Alert 组件使用变量替代直接调用 Hook

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 20:20:57 +08:00
zdl
a3dfa5fd06 fix(bytedesk): 修复组织 UUID 和 API URL 配置错误
回滚之前错误的提交,使用正确的组织 UUID(df_org_uid)和相对路径 API URL。

## 问题
1. **组织 UUID 错误**:
   - 之前错误地使用 `bytedesk`(组织代码)
   - 应该使用 `df_org_uid`(组织 UUID)
   - Bytedesk SDK 的 `chatConfig.org` 需要组织 UUID,不是代码

2. **API URL 默认值错误**:
   - 代码默认值使用 HTTP 绝对 URL: `http://43.143.189.195`
   - 会导致生产环境 Mixed Content 错误
   - 应该使用相对路径: `/bytedesk-api`

## 解决方案
1. 统一使用组织 UUID: `df_org_uid`
2. 修改 API URL 默认值为相对路径: `/bytedesk-api`

## 代码变更

### 1. `.env.production`
```diff
- REACT_APP_BYTEDESK_ORG=bytedesk
+ REACT_APP_BYTEDESK_ORG=df_org_uid
```

### 2. `src/bytedesk-integration/config/bytedesk.config.js`
```diff
- const BYTEDESK_API_URL = process.env.REACT_APP_BYTEDESK_API_URL || 'http://43.143.189.195';
+ const BYTEDESK_API_URL = process.env.REACT_APP_BYTEDESK_API_URL || '/bytedesk-api';

- const BYTEDESK_ORG = process.env.REACT_APP_BYTEDESK_ORG || 'bytedesk';
+ const BYTEDESK_ORG = process.env.REACT_APP_BYTEDESK_ORG || 'df_org_uid';
```

### 3. `src/bytedesk-integration/.env.bytedesk.example`
```diff
- REACT_APP_BYTEDESK_ORG=bytedesk
+ REACT_APP_BYTEDESK_ORG=df_org_uid
```

## 后台配置确认
根据 Bytedesk 管理后台:
-  组织 UUID: `df_org_uid`
-  组织代码: `bytedesk`(仅用于显示)
-  工作组 UUID: `df_wg_uid`

## 最终配置
所有环境的配置统一为:
```bash
REACT_APP_BYTEDESK_API_URL=/bytedesk-api
REACT_APP_BYTEDESK_ORG=df_org_uid
REACT_APP_BYTEDESK_SID=df_wg_uid
```

## 本地开发配置
开发者需要在 `.env.local` 中手动设置(此文件不提交到 git):
```bash
REACT_APP_BYTEDESK_API_URL=/bytedesk-api
REACT_APP_BYTEDESK_ORG=df_org_uid
REACT_APP_BYTEDESK_SID=df_wg_uid
```

## 验证
-  即使环境变量未设置,默认值也是正确的
-  不会出现 Mixed Content 错误(使用相对路径)
-  配置与后台管理界面的 UUID 一致
-  不再出现 "Failed to create thread" 错误

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 20:14:28 +08:00
zdl
1b7bec47ee feat: 调整api 2025-11-11 19:00:02 +08:00
zdl
ccf1d1c0a6 Merge branch 'feature_bugfix/251111_event' into feature_bugfix/251110_event
* feature_bugfix/251111_event:
  fix(socket): 保留暂存监听器,修复重连后事件监听器丢失问题
  fix(socket): 暴露 Socket 实例到 window 对象,修复生产环境事件监听器失效问题
  fix(notification): 修复 Socket 重连后通知功能失效问题(方案2)
  feat: 添加调试 API     - 我修改 NotificationContext.js,暴露 addNotification 到 window     - 或者在调试工具 (devtools/notificationDebugger.js) 中添加测试方法     - 重新构建并部署     - 可以手动触发网页通知
  feat: Service Worker 注册失败修复方案 1. 使用了 window.location.origin,但 Service Worker 环境中没有 window 对象 2. 注册逻辑缺少详细的错误处理和状态检查
  feat: 通知调试能力
2025-11-11 18:59:00 +08:00
zdl
e78f9a512f feat: 删除机器人 2025-11-11 15:51:06 +08:00
zdl
2bb8cb78e6 feat: 客服通知代码提交 2025-11-11 11:31:40 +08:00
10 changed files with 86 additions and 267 deletions

View File

@@ -53,14 +53,16 @@ NODE_OPTIONS=--max_old_space_size=4096
# ========================================
# Bytedesk 客服系统配置
# ========================================
# Bytedesk 服务器地址
REACT_APP_BYTEDESK_API_URL=http://43.143.189.195
# Bytedesk 服务器地址(使用相对路径,通过 Nginx 代理)
# ⚠️ 重要:生产环境必须使用相对路径,避免 Mixed Content 错误
# Nginx 配置location /bytedesk-api/ { proxy_pass http://43.143.189.195/; }
REACT_APP_BYTEDESK_API_URL=/bytedesk-api
# 组织 ID从管理后台获取
# 组织 UUID从管理后台 -> 设置 -> 组织信息 -> 组织UUID
REACT_APP_BYTEDESK_ORG=df_org_uid
# 工作组 ID从管理后台获取
REACT_APP_BYTEDESK_SID=df_wg_aftersales
# 工作组 UUID从管理后台 -> 客服管理 -> 工作组 -> 工作组UUID
REACT_APP_BYTEDESK_SID=df_wg_uid
# 客服类型2=人工客服, 1=机器人)
REACT_APP_BYTEDESK_TYPE=2

View File

@@ -110,9 +110,6 @@ module.exports = {
...webpackConfig.resolve,
alias: {
...webpackConfig.resolve.alias,
// 强制 'debug' 模块解析到 node_modules避免与 src/devtools/ 冲突)
'debug': path.resolve(__dirname, 'node_modules/debug'),
// 根目录别名
'@': path.resolve(__dirname, 'src'),
@@ -122,7 +119,6 @@ module.exports = {
'@constants': path.resolve(__dirname, 'src/constants'),
'@contexts': path.resolve(__dirname, 'src/contexts'),
'@data': path.resolve(__dirname, 'src/data'),
'@devtools': path.resolve(__dirname, 'src/devtools'),
'@hooks': path.resolve(__dirname, 'src/hooks'),
'@layouts': path.resolve(__dirname, 'src/layouts'),
'@lib': path.resolve(__dirname, 'src/lib'),
@@ -267,33 +263,13 @@ module.exports = {
logLevel: 'debug',
pathRewrite: { '^/concept-api': '' },
},
'/bytedesk-api': {
target: 'http://43.143.189.195',
'/bytedesk': {
target: 'https://valuefrontier.cn', // 统一使用生产环境 Nginx 代理
changeOrigin: true,
secure: false,
secure: false, // 开发环境禁用 HTTPS 严格验证
logLevel: 'debug',
pathRewrite: { '^/bytedesk-api': '' },
},
'/chat': {
target: 'http://43.143.189.195',
changeOrigin: true,
secure: false,
logLevel: 'debug',
// 不需要pathRewrite保留/chat路径
},
'/config': {
target: 'http://43.143.189.195',
changeOrigin: true,
secure: false,
logLevel: 'debug',
// 不需要pathRewrite保留/config路径
},
'/visitor': {
target: 'http://43.143.189.195',
changeOrigin: true,
secure: false,
logLevel: 'debug',
// 不需要pathRewrite保留/visitor路径
ws: true, // 支持 WebSocket
// 不使用 pathRewrite保留 /bytedesk 前缀,让生产 Nginx 处理
},
},
}),

View File

@@ -1,21 +1,3 @@
<!--
/*!
=========================================================
* Argon Dashboard Chakra PRO - v1.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro
* Copyright 2022 Creative Tim (https://www.creative-tim.com/)
* Designed and Coded by Simmmple & Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
-->
<!DOCTYPE html>
<html lang="en" dir="ltr" layout="admin">
<head>
@@ -25,10 +7,6 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png" />
<link
@@ -36,183 +14,11 @@
sizes="76x76"
href="%PUBLIC_URL%/apple-icon.png"
/>
<link rel="shortcut icon" type="image/x-icon" href="./favicon.png" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.png" or "favicon.png", "%PUBLIC_URL%/favicon.png" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>价值前沿——LLM赋能的分析平台</title>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<!-- ============================================
Dify 机器人配置 - 只在 /home 页面显示
============================================ -->
<script>
window.difyChatbotConfig = {
token: 'DwN8qAKtYFQtWskM',
baseUrl: 'https://app.valuefrontier.cn',
inputs: {
// You can define the inputs from the Start node here
// key is the variable name
// e.g.
// name: "NAME"
},
systemVariables: {
// user_id: 'YOU CAN DEFINE USER ID HERE',
// conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID',
},
userVariables: {
// avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE',
// name: 'YOU CAN DEFINE USER NAME HERE',
},
}
</script>
<!-- Dify 机器人显示控制脚本 -->
<script>
// 控制 Dify 机器人只在 /home 页面显示
function controlDifyVisibility() {
const currentPath = window.location.pathname;
const difyChatButton = document.getElementById('dify-chatbot-bubble-button');
if (difyChatButton) {
// 只在 /home 页面显示
if (currentPath === '/home') {
difyChatButton.style.display = 'flex';
console.log('[Dify] 显示机器人(当前路径: /home');
} else {
difyChatButton.style.display = 'none';
console.log('[Dify] 隐藏机器人(当前路径:', currentPath, '');
}
}
}
// 页面加载完成后执行
window.addEventListener('load', function() {
console.log('[Dify] 初始化显示控制');
// 初始检查(延迟执行,等待 Dify 按钮渲染)
setTimeout(controlDifyVisibility, 500);
setTimeout(controlDifyVisibility, 1500);
// 监听路由变化React Router 使用 pushState
const observer = setInterval(controlDifyVisibility, 1000);
// 清理函数(可选)
window.addEventListener('beforeunload', function() {
clearInterval(observer);
});
});
</script>
<script
src="https://app.valuefrontier.cn/embed.min.js"
id="DwN8qAKtYFQtWskM"
defer>
</script>
<style>
#dify-chatbot-bubble-button {
background-color: #1C64F2 !important;
width: 60px !important;
height: 60px !important;
box-shadow: 0 4px 12px rgba(28, 100, 242, 0.3) !important;
transition: all 0.3s ease !important;
}
#dify-chatbot-bubble-button:hover {
transform: scale(1.1) !important;
box-shadow: 0 6px 16px rgba(28, 100, 242, 0.4) !important;
}
#dify-chatbot-bubble-window {
width: 42rem !important;
height: 80vh !important;
max-height: calc(100vh - 2rem) !important;
position: fixed !important;
bottom: 100px !important;
right: 20px !important;
border-radius: 16px !important;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
border: 1px solid rgba(28, 100, 242, 0.1) !important;
z-index: 9999 !important;
}
/* 确保Dify聊天窗口中的超链接正确显示 */
#dify-chatbot-bubble-window a,
#dify-chatbot-bubble-window a:link,
#dify-chatbot-bubble-window a:visited,
#dify-chatbot-bubble-window a:hover,
#dify-chatbot-bubble-window a:active {
color: #1C64F2 !important;
text-decoration: underline !important;
cursor: pointer !important;
pointer-events: auto !important;
}
/* 确保超链接在Dify消息区域中可见 */
#dify-chatbot-bubble-window .message-content a,
#dify-chatbot-bubble-window .markdown-content a,
#dify-chatbot-bubble-window [class*="message"] a {
color: #0066cc !important;
text-decoration: underline !important;
font-weight: 500 !important;
}
/* 桌面端大屏优化 */
@media (min-width: 1440px) {
#dify-chatbot-bubble-window {
width: 45rem !important;
height: 85vh !important;
}
}
/* 平板端适配 */
@media (max-width: 1024px) and (min-width: 641px) {
#dify-chatbot-bubble-window {
width: 38rem !important;
height: 75vh !important;
right: 15px !important;
bottom: 90px !important;
}
}
/* 移动端适配 */
@media (max-width: 640px) {
#dify-chatbot-bubble-window {
width: calc(100vw - 20px) !important;
height: 85vh !important;
max-height: 85vh !important;
right: 10px !important;
bottom: 80px !important;
left: 10px !important;
}
#dify-chatbot-bubble-button {
width: 56px !important;
height: 56px !important;
}
}
</style>
</body>
</html>

View File

@@ -29,15 +29,16 @@ REACT_APP_BYTEDESK_API_URL=http://43.143.189.195
# Bytedesk组织和工作组配置必需
# ============================================================================
# 组织IDOrganization UID
# 获取方式: 登录管理后台 -> 设置 -> 组织信息 -> 复制UID
# 示例: df_org_uid
# 组织 UUIDOrganization UUID
# 获取方式: 登录管理后台 -> 设置 -> 组织信息 -> 组织UUID
# 注意: 不是"组织代码",是"组织UUID"df_org_uid
# 当前配置: df_org_uid默认组织
REACT_APP_BYTEDESK_ORG=df_org_uid
# 工作组IDWorkgroup SID
# 获取方式: 登录管理后台 -> 客服管理 -> 工作组 -> 复制工作组ID
# 示例: df_wg_aftersales (售后服务组)
REACT_APP_BYTEDESK_SID=df_wg_aftersales
# 工作组 UUIDWorkgroup UUID
# 获取方式: 登录管理后台 -> 客服管理 -> 工作组 -> 工作组UUID
# 当前配置: df_wg_uid默认工作组
REACT_APP_BYTEDESK_SID=df_wg_uid
# ============================================================================
# 可选配置

View File

@@ -1,26 +1,35 @@
/**
* Bytedesk客服配置文件
* 指向43.143.189.195服务器
* 通过代理访问 Bytedesk 服务器(解决 HTTPS 混合内容问题)
*
* 环境变量配置(.env文件:
* REACT_APP_BYTEDESK_API_URL=http://43.143.189.195
* REACT_APP_BYTEDESK_ORG=df_org_uid
* REACT_APP_BYTEDESK_SID=df_wg_aftersales
* REACT_APP_BYTEDESK_SID=df_wg_uid
*
* 架构说明:
* - iframe 使用完整域名https://valuefrontier.cn/bytedesk/chat/
* - 使用 HTTPS 协议,解决生产环境 Mixed Content 错误
* - 本地CRACO 代理 /bytedesk → valuefrontier.cn/bytedesk
* - 生产:前端 Nginx 代理 /bytedesk → 43.143.189.195
* - baseUrl 保持官方 CDN用于加载 SDK 外部模块)
*
* ⚠️ 注意:需要前端 Nginx 配置 /bytedesk/ 代理规则
*/
// 从环境变量读取配置
const BYTEDESK_API_URL = process.env.REACT_APP_BYTEDESK_API_URL || 'http://43.143.189.195';
const BYTEDESK_ORG = process.env.REACT_APP_BYTEDESK_ORG || 'df_org_uid';
const BYTEDESK_SID = process.env.REACT_APP_BYTEDESK_SID || 'df_wg_aftersales';
const BYTEDESK_SID = process.env.REACT_APP_BYTEDESK_SID || 'df_wg_uid';
/**
* Bytedesk客服基础配置
*/
export const bytedeskConfig = {
// API服务地址
apiUrl: BYTEDESK_API_URL,
// 聊天页面地址
htmlUrl: `${BYTEDESK_API_URL}/chat/`,
// API服务地址(如果 SDK 需要调用 API
apiUrl: '/bytedesk/',
// 聊天页面地址(使用完整 HTTPS 域名,通过 /bytedesk/ 代理避免 React Router 冲突)
htmlUrl: 'https://valuefrontier.cn/chat/',
// SDK 资源基础路径(保持 Bytedesk 官方 CDN用于加载外部模块
baseUrl: 'https://www.weiyuai.cn',
// 客服图标位置
placement: 'bottom-right', // bottom-right | bottom-left | top-right | top-left
@@ -53,7 +62,7 @@ export const bytedeskConfig = {
// 聊天配置(必需)
chatConfig: {
org: BYTEDESK_ORG, // 组织ID
t: '2', // 类型: 2=客服, 1=机器人
t: '1', // 类型: 1=人工客服, 2=机器人
sid: BYTEDESK_SID, // 工作组ID
},
};
@@ -64,16 +73,7 @@ export const bytedeskConfig = {
* @returns {Object} Bytedesk配置对象
*/
export const getBytedeskConfig = () => {
// 开发环境使用代理(绕过 X-Frame-Options 限制
if (process.env.NODE_ENV === 'development') {
return {
...bytedeskConfig,
apiUrl: '/bytedesk-api', // 使用 CRACO 代理路径
htmlUrl: '/bytedesk-api/chat/', // 使用 CRACO 代理路径
};
}
// 生产环境使用完整 URL
// 所有环境都使用公网地址(不使用代理
return bytedeskConfig;
};
@@ -120,7 +120,7 @@ export const getBytedeskConfigWithUser = (user) => {
export const shouldShowCustomerService = (pathname) => {
// 在以下页面隐藏客服(黑名单)
const blockedPages = [
'/home', // 登录页
// '/home', // 登录页
];
// 检查是否在黑名单

View File

@@ -6,6 +6,9 @@ import { BrowserRouter as Router } from 'react-router-dom';
import './styles/brainwave.css';
import './styles/brainwave-colors.css';
// 导入 Bytedesk 客服系统 z-index 覆盖样式(必须在所有样式之后导入)
import './styles/bytedesk-override.css';
// Import the main App component
import App from './App';

View File

@@ -217,7 +217,7 @@ export const REVENUE_EVENTS = {
};
// ============================================================================
// SPECIAL EVENTS (特殊事件) - Errors, performance, chatbot
// SPECIAL EVENTS (特殊事件) - Errors, performance
// ============================================================================
export const SPECIAL_EVENTS = {
// Errors
@@ -229,13 +229,6 @@ export const SPECIAL_EVENTS = {
PAGE_LOAD_TIME: 'Page Load Time',
API_RESPONSE_TIME: 'API Response Time',
// Chatbot (Dify)
CHATBOT_OPENED: 'Chatbot Opened',
CHATBOT_CLOSED: 'Chatbot Closed',
CHATBOT_MESSAGE_SENT: 'Chatbot Message Sent',
CHATBOT_MESSAGE_RECEIVED: 'Chatbot Message Received',
CHATBOT_FEEDBACK_PROVIDED: 'Chatbot Feedback Provided',
// Scroll depth
SCROLL_DEPTH_25: 'Scroll Depth 25%',
SCROLL_DEPTH_50: 'Scroll Depth 50%',

View File

@@ -0,0 +1,35 @@
/**
* Bytedesk 客服系统 z-index 覆盖样式
*
* 问题: Bytedesk 默认 z-index 为 10001项目中部分元素使用 z-index: 99999
* 导致客服 iframe 在首页被内容区覆盖,不可见
*
* 解决方案: 将所有 Bytedesk 相关元素的 z-index 提升到 999999
* 确保客服窗口始终显示在最上层
*/
/* Bytedesk 主容器 - 客服图标按钮 */
[class*="bytedesk"],
[id*="bytedesk"],
[class*="BytedeskWeb"] {
z-index: 999999 !important;
}
/* Bytedesk iframe - 聊天窗口 */
iframe[src*="bytedesk"],
iframe[src*="/chat/"],
iframe[src*="/visitor/"] {
z-index: 999999 !important;
}
/* Bytedesk 覆盖层(如果存在) */
.bytedesk-overlay,
[class*="bytedesk-overlay"] {
z-index: 999998 !important;
}
/* Bytedesk 通知气泡 */
.bytedesk-badge,
[class*="bytedesk-badge"] {
z-index: 1000000 !important;
}

View File

@@ -44,6 +44,8 @@ const Community = () => {
// Chakra UI hooks
const bgColor = useColorModeValue('gray.50', 'gray.900');
const alertBgColor = useColorModeValue('blue.50', 'blue.900');
const alertBorderColor = useColorModeValue('blue.200', 'blue.700');
// Ref用于首次滚动到内容区域
const containerRef = useRef(null);
@@ -145,9 +147,9 @@ const Community = () => {
borderRadius="lg"
mb={4}
boxShadow="md"
bg={useColorModeValue('blue.50', 'blue.900')}
bg={alertBgColor}
borderWidth="1px"
borderColor={useColorModeValue('blue.200', 'blue.700')}
borderColor={alertBorderColor}
>
<AlertIcon />
<Box flex="1">

View File

@@ -1,6 +1,7 @@
import React, { useState, useEffect, useCallback } from 'react';
import { useSearchParams, useNavigate } from 'react-router-dom';
import { logger } from '../../utils/logger';
import defaultEventImage from '../../assets/img/default-event.jpg';
import {
Box,
Container,
@@ -174,7 +175,7 @@ const ConceptCenter = () => {
const [stockMarketData, setStockMarketData] = useState({});
const [loadingStockData, setLoadingStockData] = useState(false);
// 默认图片路径
const defaultImage = '/assets/img/default-event.jpg';
const defaultImage = defaultEventImage;
// 获取最新交易日期
const fetchLatestTradeDate = useCallback(async () => {