fix: 配置文件config.js变更

This commit is contained in:
TsMask
2025-03-24 14:49:33 +08:00
parent 05d4b0cd3e
commit 665946c4c2

View File

@@ -13,14 +13,17 @@
// baseUrl = protocol://ip:port
// baseUrl = 'http://192.168.8.100:33030';
const protocol = window.location.protocol
const hostname = window.location.hostname
const wsprotocol = "ws:"
// const hostname = window.location.hostname
const hostname = "127.0.0.100"
let host = `${hostname}:33030`;
if (protocol === 'https:') {
host = `${hostname}:33443`;
wsprotocol = "wss:"
}
// Service Address
sessionStorage.setItem('baseUrl', `${protocol}//${host}`);
// websocket Address
sessionStorage.setItem('wsUrl', `ws://${host}`);
sessionStorage.setItem('wsUrl', `${wsprotocol}//${host}`);
})();