feat: 配置调整
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* Bytedesk客服配置文件
|
* Bytedesk客服配置文件
|
||||||
* 指向43.143.189.195服务器
|
* 指向43.143.189.195服务器(通过 CRACO 和后端 Nginx 代理)
|
||||||
*
|
*
|
||||||
* 环境变量配置(.env文件):
|
* 环境变量配置(.env文件):
|
||||||
* REACT_APP_BYTEDESK_API_URL=/bytedesk-api
|
|
||||||
* 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/*
|
||||||
|
* → CRACO 代理 → https://valuefrontier.cn/bytedesk-api/*
|
||||||
|
* → 后端 Nginx(去掉 /bytedesk-api/ 前缀)→ 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 || 'df_org_uid';
|
const BYTEDESK_ORG = process.env.REACT_APP_BYTEDESK_ORG || 'df_org_uid';
|
||||||
const BYTEDESK_SID = process.env.REACT_APP_BYTEDESK_SID || 'df_wg_uid';
|
const BYTEDESK_SID = process.env.REACT_APP_BYTEDESK_SID || 'df_wg_uid';
|
||||||
|
|
||||||
@@ -17,10 +20,10 @@ const BYTEDESK_SID = process.env.REACT_APP_BYTEDESK_SID || 'df_wg_uid';
|
|||||||
* Bytedesk客服基础配置
|
* Bytedesk客服基础配置
|
||||||
*/
|
*/
|
||||||
export const bytedeskConfig = {
|
export const bytedeskConfig = {
|
||||||
// API服务地址
|
// API服务地址(通过 CRACO 代理,不重复拼接前缀)
|
||||||
apiUrl: BYTEDESK_API_URL,
|
apiUrl: '/bytedesk-api/',
|
||||||
// 聊天页面地址
|
// 聊天页面地址
|
||||||
htmlUrl: `${BYTEDESK_API_URL}/chat/`,
|
htmlUrl: '/bytedesk-api/chat/',
|
||||||
// SDK 资源基础路径(用于加载内部模块 sdk.js, index.js 等)
|
// SDK 资源基础路径(用于加载内部模块 sdk.js, index.js 等)
|
||||||
baseUrl: 'https://www.weiyuai.cn',
|
baseUrl: 'https://www.weiyuai.cn',
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user