king
2025-05-08 400fee62fb40006a9839f1c3a8244b82566b5057
src/index.js
@@ -95,10 +95,10 @@
      GLOB.externalDatabase = null
    }
    if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) {
    if (config.probation && /^[1-9]\d{3}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) {
      GLOB.probation = true
    }
    if (config.forcedUpdate && /^20\d{2}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) {
    if (config.forcedUpdate && /^[1-9]\d{3}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) {
      GLOB.forcedUpdate = true
    }
@@ -121,6 +121,10 @@
      GLOB.debugger = true
      GLOB.systemType = ''
      GLOB.upStatus = config.updateStatus + '' !== 'false'
      if (config.style_appkey) {
        GLOB.style_appkey = config.style_appkey
      }
      // GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars'
@@ -166,6 +170,10 @@
      
        GLOB.mainSystemApi = systemApi
      }
      if (config.errorLog === 'true' && /#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) {
        GLOB.errorLog = true
      }
    }
    if (/#\/hs$/.test(window.location.href)) { // hs下不打印脚本
@@ -191,6 +199,7 @@
      GLOB.host = window.location.host + (_service ? '_' + _service : '')
      GLOB.baseurl = document.location.origin + '/' + GLOB.service
      GLOB.linkurl = GLOB.baseurl + 'index.html'
      GLOB.location = document.location.origin
    } else {
      GLOB.location = config.host
      GLOB.service = config.service
@@ -234,10 +243,14 @@
        GLOB.mainlogo = _systemMsg.mainlogo
        GLOB.doclogo = _systemMsg.doclogo
        GLOB.webSite = _systemMsg.webSite
        GLOB.prolType = _systemMsg.prolType || ''
        GLOB.prolCont = _systemMsg.prolCont || ''
        GLOB.style = _systemMsg.style || 'bg_black_style_blue'
        GLOB.showline = _systemMsg.showline || ''
        GLOB.navBar = _systemMsg.navBar || 'shutter'
        GLOB.appVersion = _systemMsg.app_version || ''
        GLOB.loginOtop = _systemMsg.loginOtop || ''
        GLOB.loginOleft = _systemMsg.loginOleft || ''
        sessionStorage.setItem('appname', _systemMsg.appname || '')
        let levels = [30, 10, 20, 40, 50, 60, 70, 80, 90, 100]
@@ -276,7 +289,7 @@
    document.title = GLOB.platTitle || ''
    if (config.filter === 'true' || (/^20\d{2}-\d{2}-\d{2}$/.test(config.filter) && new Date(config.filter).getTime() + 86400000 >= new Date().getTime())) {
    if (config.filter === 'true' || (/^[1-9]\d{3}-\d{2}-\d{2}$/.test(config.filter) && new Date(config.filter).getTime() + 86400000 >= new Date().getTime())) {
      GLOB.filter = true
    }
@@ -380,12 +393,16 @@
        value: GLOB.debugger
      })
    } else if (GLOB.sysType === 'cloud') {
      Object.defineProperty(GLOB, 'debugger', {
        writable: false,
        value: GLOB.debugger
      })
      GLOB.breakpoint = false
      if (sessionStorage.getItem('cloudRun') === 'debug') {
        GLOB.debugger = true
      } else {
        Object.defineProperty(GLOB, 'debugger', {
          writable: false,
          value: GLOB.debugger
        })
        GLOB.breakpoint = false
      }
    } else {
      if (sessionStorage.getItem('breakpoint')) {
        GLOB.debugger = true
@@ -408,7 +425,7 @@
    window.GLOB.SyncData = new Map()     // 存储同步查询数据
    window.GLOB.mkThdMenus = new Map()   // 三级菜单
    if (lang === 'zh-CN' || !/#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) { // 开发使用中文
    if (lang === 'zh-CN' || !/#\/(login|main|billprint|docprint|tab\/|iframe|view|ssologin)/.test(window.location.href)) { // 开发使用中文
      ReactDOM.render(
        <ConfigProvider locale={zhCN}>
          <Route/>