From 2cc05a12c59144030963882c48a540f550d77fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Tue, 1 Nov 2022 00:58:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG:=20baseURL=E8=8E=B7?= =?UTF-8?q?=E5=8F=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/libs/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/libs/util.js b/web/src/libs/util.js index c376b2c..266436f 100644 --- a/web/src/libs/util.js +++ b/web/src/libs/util.js @@ -54,7 +54,7 @@ util.baseURL = function () { } baseURL = baseURL.split('/')[0] + '//' + baseURL.split('/')[1] + host + '/' + param } else { - baseURL = location.protocol + '//' + location.hostname + ':' + location.port + baseURL + baseURL = location.protocol + '//' + location.hostname + (location.port ? ':' : '') + location.port + baseURL } } if (!baseURL.endsWith('/')) {