|
|
@@ -12,6 +12,14 @@
|
|
|
|
|
|
let API_BASE_URL = 'http://cfc.iwintrue.com'
|
|
|
|
|
|
+// LangGraph 适配层地址(AI 对话/分析走这里,失败时回退到 Dify)
|
|
|
+// 默认本地开发:http://localhost:9000;远程环境按需修改
|
|
|
+let LANGGRAPH_BASE_URL = 'http://localhost:9000'
|
|
|
+
|
|
|
+// Dify fallback 地址(LangGraph 不可用时回退到此)
|
|
|
+// 默认本地开发:http://localhost:8083;远程环境按需修改
|
|
|
+let DIFY_BASE_URL = 'http://localhost:8083'
|
|
|
+
|
|
|
try {
|
|
|
const accountInfo = uni.getAccountInfoSync()
|
|
|
const env = accountInfo && accountInfo.miniProgram && accountInfo.miniProgram.envVersion
|
|
|
@@ -20,12 +28,18 @@ try {
|
|
|
switch (env) {
|
|
|
case 'develop':
|
|
|
API_BASE_URL = 'http://cfc.etotem.com.cn'
|
|
|
+ LANGGRAPH_BASE_URL = 'http://cfc.etotem.com.cn:9000'
|
|
|
+ DIFY_BASE_URL = 'http://cfc.etotem.com.cn:8083'
|
|
|
break
|
|
|
case 'trial':
|
|
|
API_BASE_URL = 'https://cfc.iwintrue.com'
|
|
|
+ LANGGRAPH_BASE_URL = 'https://cfc.iwintrue.com:9000'
|
|
|
+ DIFY_BASE_URL = 'https://cfc.iwintrue.com:8083'
|
|
|
break
|
|
|
case 'release':
|
|
|
API_BASE_URL = 'https://cfc.etotem.com.cn'
|
|
|
+ LANGGRAPH_BASE_URL = 'https://cfc.etotem.com.cn:9000'
|
|
|
+ DIFY_BASE_URL = 'https://cfc.etotem.com.cn:8083'
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
@@ -35,6 +49,8 @@ try {
|
|
|
|
|
|
export default {
|
|
|
API_BASE_URL,
|
|
|
+ LANGGRAPH_BASE_URL,
|
|
|
+ DIFY_BASE_URL,
|
|
|
|
|
|
/** 构建 API 完整 URL */
|
|
|
api(path) {
|