feat: 客服通知代码提交

This commit is contained in:
zdl
2025-11-11 11:31:40 +08:00
parent 8e5623d723
commit 2bb8cb78e6
3 changed files with 12 additions and 12 deletions

View File

@@ -21,6 +21,8 @@ export const bytedeskConfig = {
apiUrl: BYTEDESK_API_URL,
// 聊天页面地址
htmlUrl: `${BYTEDESK_API_URL}/chat/`,
// SDK 资源基础路径(用于加载内部模块 sdk.js, index.js 等)
baseUrl: 'https://www.weiyuai.cn',
// 客服图标位置
placement: 'bottom-right', // bottom-right | bottom-left | top-right | top-left
@@ -64,16 +66,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 +113,7 @@ export const getBytedeskConfigWithUser = (user) => {
export const shouldShowCustomerService = (pathname) => {
// 在以下页面隐藏客服(黑名单)
const blockedPages = [
'/home', // 登录页
// '/home', // 登录页
];
// 检查是否在黑名单