From aed1ff699140de60131bf9cc1332c98063c66721 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 03 七月 2020 09:14:51 +0800 Subject: [PATCH] 2020-07-03 --- src/index.js | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/index.js b/src/index.js index 4889813..2cf54ad 100644 --- a/src/index.js +++ b/src/index.js @@ -34,7 +34,10 @@ window.GLOB = window.GLOB || {} -if (!(options.sysType === 'local' && window.GLOB.systemType === 'official')) { // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 +// 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 +if (options.sysType === 'local' && (window.GLOB.systemType === 'official' || window.GLOB.systemType === 'production')) { + window.GLOB.systemType = 'production' +} else { window.GLOB.systemType = '' } @@ -119,6 +122,9 @@ if (process.env.NODE_ENV === 'production') { // 鐢ㄤ簬鏍¢獙鏄惁瀛樺湪寮�鍙戞潈闄� let _service = window.location.href.replace(/\/index.html(.*)|\/#(.*)/ig, '').replace(new RegExp(document.location.origin + '/?', 'ig'), '') window.GLOB.linkurl = window.location.href.split('#')[0] + if (!/index.html/ig.test(window.GLOB.linkurl)) { + window.GLOB.linkurl = window.GLOB.linkurl + 'index.html' + } window.GLOB.service = _service ? _service + '/' : '' } else { window.GLOB.linkurl = '' -- Gitblit v1.8.0