单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-06-25 5ad60cbbce4a7b9e1b0dcfa0eca00bd0084f013b
ID1743-添加环境变量
4个文件已修改
12 ■■■■ 已修改文件
.gitignore 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/httpApi.ts 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/deviceWindoes2.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -22,3 +22,7 @@
*.njsproj
*.sln
*.sw?
# 环境变量
.env.development
.env.production
package.json
@@ -5,7 +5,10 @@
  "type": "module",
  "scripts": {
    "dev": "vite",
    "dev:prod": "vite --mode production",
    "build": "vite build",
    "build:test": "vite build --mode development",
    "build:prod": "vite build --mode production",
    "build2": "vue-tsc -b && vite build",
    "preview": "vite preview"
  },
src/utils/httpApi.ts
@@ -14,8 +14,9 @@
    message: string;
}
const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
// const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
// const apiBaseUrl = 'https://testbs.ihemodialysis.com'; // 替换为你的API基础URL
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
export const setTimeoutAlert = async (requestData: SetTimeoutAlertRequest): Promise<ApiResponse> => {
    try {
src/views/deviceWindoes2.vue
@@ -2277,7 +2277,7 @@
  // http://testbs.ihemodialysis.com/sse/sseEvent
  // const test='http://testbs.ihemodialysis.com/sse/sseEvent/'
  数据初始化.value = true;
  const test = "https://backend.ihemodialysis.com/sse/sseEvent/";
  const test = import.meta.env.VITE_SSE_BASE_URL;
  const stateArr = [
    { key: 0, value: "正在链接中" },
    { key: 1, value: "已经链接并且可以通讯" },