| | |
| | | |
| | | } |
| | | |
| | | sessionStorage.setItem('UserID', localStorage.getItem('UserID') || '') |
| | | sessionStorage.setItem('LoginUID', localStorage.getItem('LoginUID') || '') |
| | | sessionStorage.setItem('User_Name', localStorage.getItem('User_Name') || '') |
| | | sessionStorage.setItem('Full_Name', localStorage.getItem('Full_Name') || '') |
| | | sessionStorage.setItem('avatar', localStorage.getItem('avatar') || '') |
| | | sessionStorage.setItem('dataM', localStorage.getItem('dataM') || '') |
| | | sessionStorage.setItem('localDataM', localStorage.getItem('localDataM') || '') |
| | | sessionStorage.setItem('debug', localStorage.getItem('debug') || '') |
| | | sessionStorage.setItem('role_id', localStorage.getItem('role_id') || '') |
| | | sessionStorage.setItem('departmentcode', localStorage.getItem('departmentcode') || '') |
| | | sessionStorage.setItem('organization', localStorage.getItem('organization') || '') |
| | | sessionStorage.setItem('mk_user_type', localStorage.getItem('mk_user_type') || '') |
| | | |
| | | fetch('../options.json') |
| | | .then(response => response.json()) |
| | | .catch(() => { |
| | |
| | | |
| | | GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars' |
| | | |
| | | if (config.style_appkey) { |
| | | GLOB.style_appkey = config.style_appkey |
| | | } |
| | | |
| | | // GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars' |
| | | // if (!/^https/.test(window.location.protocol)) { // https转换 |
| | | // GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars' |
| | |
| | | |
| | | 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下不打印脚本 |
| | |
| | | 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 |
| | |
| | | } |
| | | |
| | | if (config.systemRun === 'backend') { |
| | | GLOB.debugger = false |
| | | Object.defineProperty(window, 'backend', { |
| | | writable: false, |
| | | value: true |
| | | }) |
| | | if (sessionStorage.getItem('systemRun') === 'front') { |
| | | GLOB.debugger = true |
| | | } else { |
| | | GLOB.debugger = false |
| | | Object.defineProperty(window, 'backend', { |
| | | writable: false, |
| | | value: true |
| | | }) |
| | | } |
| | | } |
| | | if (config.debugger === 'forbid') { |
| | | sessionStorage.removeItem('breakpoint') |