fix: 根据浏览器地址栏hostname加33030端口连接后端服务

This commit is contained in:
TsMask
2024-07-11 17:56:24 +08:00
parent 4dc6699974
commit 6efd9cb61a

View File

@@ -11,7 +11,8 @@
*/ */
(function () { (function () {
// host = ip:port // host = ip:port
const host = '192.168.8.100:33030'; // const host = '192.168.8.100:33030';
const host = `${window.location.hostname}:33030`;
// Service Address // Service Address
sessionStorage.setItem('baseUrl', `http://${host}`); sessionStorage.setItem('baseUrl', `http://${host}`);