This commit is contained in:
2025-05-15 22:21:52 +08:00
parent cf6ca31aa4
commit 1104efaa1a
3 changed files with 9 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ export const adapter = async (opts: AdapterOpts, overloadOpts?: RequestInit) =>
if (opts?.url?.startsWith('http')) {
url = new URL(opts.url);
} else {
origin = window?.location?.origin || 'http://localhost:11015';
origin = window?.location?.origin || 'http://localhost:51015';
url = new URL(opts.url, origin);
}
const isGet = method === 'GET';

View File

@@ -62,8 +62,8 @@ export class QueryWs {
resolve(true);
return;
}
console.error('WebSocket 连接超时');
reject('timeout');
console.error('WebSocket 连接超时', that.url);
resolve(false);
}, timeout);
ws.onopen = (ev) => {
store.getState().setConnected(true);