From 1393cba2082598f1c10cbc93b246b0444aa03d26 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 19 九月 2022 14:09:01 +0800 Subject: [PATCH] 2022-09-19 --- src/index.js | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 39dd308..ee48fbf 100644 --- a/src/index.js +++ b/src/index.js @@ -204,14 +204,11 @@ } if (process.env.NODE_ENV === 'production') { // 鐢ㄤ簬鏍¢獙鏄惁瀛樺湪寮�鍙戞潈闄� - let _service = window.location.href.replace(/(\/admin)?\/index.html(.*)|(\/admin)?\/#(.*)/ig, '').replace(new RegExp(document.location.origin + '/?', 'ig'), '') - GLOB.linkurl = _href - if (!/index.html/ig.test(GLOB.linkurl)) { - GLOB.linkurl = GLOB.linkurl + 'index.html' - } + let _service = window.location.href.replace(/\/admin(.*)/ig, '').replace(new RegExp(document.location.origin + '/?', 'ig'), '') GLOB.service = _service ? _service + '/' : '' GLOB.host = window.location.host + (_service ? '_' + _service : '') GLOB.baseurl = document.location.origin + '/' + GLOB.service + GLOB.linkurl = GLOB.baseurl + 'index.html' } else { GLOB.linkurl = '' GLOB.location = config.host -- Gitblit v1.8.0