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:
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user