king
2020-07-03 aed1ff699140de60131bf9cc1332c98063c66721
src/index.js
@@ -34,7 +34,10 @@
window.GLOB = window.GLOB || {}
if (!(options.sysType === 'local' && window.GLOB.systemType === 'official')) { // 只有业务系统才可以设置为正式系统
// 只有业务系统才可以设置为正式系统
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 = ''