feat: 环境的配置

This commit is contained in:
2025-09-15 19:01:22 +08:00
parent 843d8d3138
commit 1038dd3180
9 changed files with 103 additions and 98 deletions

19
request/base/baseUrl.js Normal file
View File

@@ -0,0 +1,19 @@
const isProd = false;
// 测试
const VITE_BASE_URL_TEST = "https://onefeel.brother7.cn/ingress";
const VITE_WSS_URL_TEST = "wss://onefeel.brother7.cn/ingress/agent/ws/chat";
// 生产
const VITE_BASE_URL_PRO = "https://biz.nianxx.cn";
const VITE_WSS_URL_PRO = "wss://biz.nianxx.cn/agent/ws/chat";
// 环境配置
export const BASE_URL = isProd ? VITE_BASE_URL_PRO : VITE_BASE_URL_TEST;
export const WSS_URL = isProd ? VITE_WSS_URL_PRO : VITE_WSS_URL_TEST;
// =====================================
// 环境配置文件使用方法
// console.log("当前环境:", import.meta.env);
// export const BASE_URL = import.meta.env.VITE_BASE_URL;
// export const WSS_URL = import.meta.env.VITE_WSS_URL;