From 262087d13f140f68768d4a311b188f8d035e9cf4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 19 九月 2022 14:10:16 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/index.js |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/index.js b/src/index.js
index 909a4bf..c9434c0 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