From 7c7c6619b9df649272791fdc16d5e37bd67e1986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 1 Dec 2021 22:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/app.js b/static/app.js index e1dde7560..f00baf238 100644 --- a/static/app.js +++ b/static/app.js @@ -1,7 +1,6 @@ /*! 项目应用根路径 */ window.appRoot = (function (script) { - let src = script.src.split('/').slice(3); - return src.pop(), src.pop(), '/' + src.join('/') + '/'; + return '/' + script.src.split('/').slice(3, -2).join('/') + '/'; })(document.querySelector('script[src][type=module]:last-child')); ;(async () => {