feat: 调整环境配置
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
/**
|
/**
|
||||||
* Bytedesk客服配置文件
|
* Bytedesk客服配置文件
|
||||||
* 指向43.143.189.195服务器(通过 CRACO 和后端 Nginx 代理)
|
* iframe 直接指向 43.143.189.195 服务器(不经过代理)
|
||||||
*
|
*
|
||||||
* 环境变量配置(.env文件):
|
* 环境变量配置(.env文件):
|
||||||
* REACT_APP_BYTEDESK_ORG=df_org_uid
|
* REACT_APP_BYTEDESK_ORG=df_org_uid
|
||||||
* REACT_APP_BYTEDESK_SID=df_wg_uid
|
* REACT_APP_BYTEDESK_SID=df_wg_uid
|
||||||
*
|
*
|
||||||
* 代理链路:
|
* 架构说明:
|
||||||
* 前端请求 /bytedesk-api/*
|
* - API 请求(如有):通过 /bytedesk-api/ 代理
|
||||||
* → CRACO 代理 → https://valuefrontier.cn/bytedesk-api/*
|
* - iframe 聊天窗口:直接访问 http://43.143.189.195/chat/
|
||||||
* → 后端 Nginx(去掉 /bytedesk-api/ 前缀)→ http://43.143.189.195/*
|
* - iframe 内部资源:相对于 43.143.189.195 解析,无需前端 Nginx 配置 /chat/ 代理
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 从环境变量读取配置
|
// 从环境变量读取配置
|
||||||
@@ -20,12 +20,12 @@ const BYTEDESK_SID = process.env.REACT_APP_BYTEDESK_SID || 'df_wg_uid';
|
|||||||
* Bytedesk客服基础配置
|
* Bytedesk客服基础配置
|
||||||
*/
|
*/
|
||||||
export const bytedeskConfig = {
|
export const bytedeskConfig = {
|
||||||
// API服务地址(通过 CRACO 代理,不重复拼接前缀)
|
// API服务地址(如果 SDK 需要调用 API)
|
||||||
apiUrl: '/bytedesk-api/',
|
apiUrl: '/bytedesk-api/',
|
||||||
// 聊天页面地址
|
// 聊天页面地址(直接指向 Bytedesk 服务器,不经过代理)
|
||||||
htmlUrl: '/bytedesk-api/chat/',
|
htmlUrl: 'http://43.143.189.195/chat/',
|
||||||
// SDK 资源基础路径(用于加载内部模块 sdk.js, index.js 等)
|
// SDK 资源基础路径(iframe 内部资源会相对于此域名加载)
|
||||||
baseUrl: 'https://www.weiyuai.cn',
|
baseUrl: 'http://43.143.189.195',
|
||||||
|
|
||||||
// 客服图标位置
|
// 客服图标位置
|
||||||
placement: 'bottom-right', // bottom-right | bottom-left | top-right | top-left
|
placement: 'bottom-right', // bottom-right | bottom-left | top-right | top-left
|
||||||
|
|||||||
Reference in New Issue
Block a user