Compare commits
1 Commits
2107dfa261
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
674c1c715d |
@@ -1,5 +1,5 @@
|
|||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API='/api'
|
VITE_APP_BASE_API=/api
|
||||||
|
|
||||||
|
|
||||||
VITE_APP_BASE_URL='http://192.168.1.38:18081'
|
VITE_APP_BASE_URL=http://192.168.1.38:18081
|
||||||
@@ -12,7 +12,7 @@ interface EventData {
|
|||||||
code: 200 | 201 | 300 | 400 | 500;
|
code: 200 | 201 | 300 | 400 | 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface logItem {
|
export interface logItem {
|
||||||
message: string;
|
message: string;
|
||||||
type?: "success" | "error" | "log";
|
type?: "success" | "error" | "log";
|
||||||
}
|
}
|
||||||
@@ -126,10 +126,11 @@ export function useSSE(options: SSEOptions) {
|
|||||||
}, options.timeout || 10000); // 默认10秒超时
|
}, options.timeout || 10000); // 默认10秒超时
|
||||||
|
|
||||||
// 创建EventSource
|
// 创建EventSource
|
||||||
const eventSourceOptions = {
|
const eventSourceOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${getToken()}`,
|
Authorization: `Bearer ${getToken()}`,
|
||||||
}
|
},
|
||||||
|
heartbeatTimeout: 90 * 60 * 1000,
|
||||||
};
|
};
|
||||||
eventSource = new EventSourcePolyfill(connectUrl, eventSourceOptions);
|
eventSource = new EventSourcePolyfill(connectUrl, eventSourceOptions);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user