wss问题
This commit is contained in:
parent
b76f6322c8
commit
464d5a34b0
@ -45,13 +45,9 @@ export function websocketUrl() {
|
|||||||
}
|
}
|
||||||
const location = window.location;
|
const location = window.location;
|
||||||
const protocol = location.protocol;
|
const protocol = location.protocol;
|
||||||
console.log(protocol);
|
const wsProtocol = protocol.replace('https:', 'wss:').replace('http:', 'ws:')
|
||||||
let wsProtocol = 'ws';
|
|
||||||
if (protocol == 'https') {
|
|
||||||
wsProtocol = 'wss';
|
|
||||||
}
|
|
||||||
console.log(wsProtocol);
|
console.log(wsProtocol);
|
||||||
return `${wsProtocol}://${location.host}${WebSocketBaseUrl}`;
|
return `${wsProtocol}//${location.host}${WebSocketBaseUrl}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function downloadUrl(fileId: string, isDownload?: boolean) {
|
export function downloadUrl(fileId: string, isDownload?: boolean) {
|
||||||
|
Loading…
Reference in New Issue
Block a user