fix: 验收包写入公司内网地址,避免 Windows 空 VITE 与 Android 假域名
Windows 补 .env.production 与 endpoints 兜底;Android 默认 host/端口改为内网,启动后重写 HttpUtil/ApiService,Urls 改为 getter。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
18d890ae7f
commit
bbc4dce0b6
@@ -19,6 +19,7 @@ import { useEffect, useRef } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { CustomType } from "@/constants";
|
||||
import { API_URL, WS_URL } from "@/config/endpoints";
|
||||
import {
|
||||
pushNewMessage,
|
||||
updateOneMessage,
|
||||
@@ -123,8 +124,8 @@ export function useGlobalEvent() {
|
||||
const IMToken = (await getIMToken()) as string;
|
||||
const IMUserID = (await getIMUserID()) as string;
|
||||
try {
|
||||
const apiAddr = import.meta.env.VITE_API_URL;
|
||||
const wsAddr = import.meta.env.VITE_WS_URL;
|
||||
const apiAddr = API_URL;
|
||||
const wsAddr = WS_URL;
|
||||
if (window.electronAPI) {
|
||||
await IMSDK.initSDK({
|
||||
platformID: window.electronAPI?.getPlatform() ?? 5,
|
||||
|
||||
Reference in New Issue
Block a user