fix(miniapp): 开发态 API base URL 由 localhost 改为 127.0.0.1

- 规避模拟器 localhost→::1 的 IPv6 解析歧义导致的 ERR_CONNECTION_REFUSED
  (onLaunch 全量启动拉取 /app/config 失败后不自动重试,热重载不重跑)
- 生产 base 不变;仅 env.ts/env.js 的 isDev 分支
This commit is contained in:
WorkBuddy
2026-10-09 22:46:31 +08:00
parent 4edb7619bc
commit f76bda1efa
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ const PROD_API_BASE_URL: string =
|| 'https://api.danyang-match.example.com/api/v1'; // TODO(部署): 替换为真实生产域名
export const API_BASE_URL: string = isDev()
? 'http://localhost:8085/api/v1'
? 'http://127.0.0.1:8085/api/v1'
: PROD_API_BASE_URL;
export const IS_DEV: boolean = isDev();