update 适配 websocket在https下的连接方式
This commit is contained in:
parent
0a8c33c3cb
commit
35bebf403c
@ -99,7 +99,8 @@
|
||||
import { initWebSocket } from '@/utils/websocket';
|
||||
|
||||
onMounted(() => {
|
||||
initWebSocket("ws://" + window.location.host + import.meta.env.VITE_APP_BASE_API + "/resource/websocket");
|
||||
let protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://'
|
||||
initWebSocket(protocol + window.location.host + import.meta.env.VITE_APP_BASE_API + "/resource/websocket");
|
||||
});
|
||||
|
||||
const goTarget = (url:string) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user