// 判断浏览器是否为IE const ua = window.navigator.userAgent const isIE = ua.indexOf('MSIE') !== -1 || ua.indexOf('Trident/') !== -1 // 如果浏览器为IE,则提示用户更新浏览器 if (isIE) { // alert('您的浏览器版本过低,请更新浏览器!') window.unsupportedBrowser = true document.getElementById('app').innerHTML = '

您的浏览器版本过低,请升级浏览器以获取更好的体验!
推荐使用 Microsoft Edge 或者 Google Chrome 浏览器。
如果您使用的是双核浏览器,请切换到极速模式访问

' } // 本地开发环境 const local = { // web_pc: 'https://tyyx.bozedu.top/', // web_mobile: 'https://tyyxm.bozedu.top/', api: 'https://openapi.dev.bozedu.net/', oss: 'https://openapi.dev.bozedu.net/', uc: 'https://uc.dev.bozedu.net/', myxjyszptx: 'https://myxjyszptxapi.bozedu.top/', origin: window.location.origin, } // 测试服环境 const development = { web_pc: 'https://myxjyszptxweb.bozedu.top/', origin: window.location.origin, api: 'https://openapi.dev.bozedu.net/', oss: 'https://openapi.dev.bozedu.net/', uc: 'https://uc.dev.bozedu.net/', myxjyszptx: 'https://myxjyszptxapi.bozedu.top/', } // // 正式服环境 const production = { web_pc: 'https://myxjyszptxweb.bozedu.net/', origin: window.location.origin, api: 'https://openapi.bozedu.net/', oss: 'https://openapi.bozedu.net/', uc: 'https://uc.bozedu.net/', myxjyszptx: 'https://myxjyszptxapi.bozedu.net/', } function isWhich() { if (window.location.href.indexOf(development.web_pc) === 0) { return development } else if (window.location.href.indexOf(production.web_pc) === 0) { return production } else { return local } } window.GLOBAL_CONFIG = isWhich()