| | |
| | | import '@/assets/css/minkeicon.css' |
| | | import '@/assets/css/viewstyle.scss' |
| | | |
| | | if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { |
| | | window.location.replace(window.location.href.split(/(index.html)+/ig)[0] + 'mob/index.html') |
| | | } else if (window.location.href.indexOf('#/design') > -1) { // 编辑页面刷新时,跳转至主页 |
| | | if (window.location.href.indexOf('#/design') > -1) { // 编辑页面刷新时,跳转至主页 |
| | | window.location.replace(window.location.href.replace(/design/ig, 'main')) |
| | | } |
| | | |
| | |
| | | })()) |
| | | } |
| | | |
| | | const render = Component => { |
| | | const render = Component => { |
| | | ReactDOM.render( |
| | | <Provider store={store}> |
| | | <Component/> |
| | |
| | | }) |
| | | .then(config => { |
| | | if (!config) return |
| | | |
| | | if (config.defaultApp) { |
| | | if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { |
| | | window.location.replace(window.location.href.split(/(index.html)+/ig)[0].replace('admin/', '') + 'mob/index.html#/index') |
| | | return |
| | | } |
| | | } |
| | | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | |
| | | |
| | | let _href = window.location.href.split('#')[0] |
| | | |
| | | if (localStorage.getItem(_href + 'lang')) { |
| | | sessionStorage.setItem('lang', localStorage.getItem(_href + 'lang')) |
| | | } else { |
| | | sessionStorage.setItem('lang', config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') |
| | | } |
| | | |
| | | let _systemMsg = localStorage.getItem(_href + 'system') |
| | | |
| | | if (_systemMsg) { |
| | |
| | | GLOB.service = config.service |
| | | } |
| | | |
| | | let mark = sessionStorage.getItem('system_mark') |
| | | let _mark = `sys_${GLOB.service.replace('/', '') || 'service'}` |
| | | if (mark && mark !== _mark) { |
| | | sessionStorage.clear() |
| | | } |
| | | sessionStorage.setItem('system_mark', _mark) |
| | | |
| | | if (localStorage.getItem(_href + 'lang')) { |
| | | sessionStorage.setItem('lang', localStorage.getItem(_href + 'lang')) |
| | | } else { |
| | | sessionStorage.setItem('lang', config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') |
| | | } |
| | | |
| | | Object.defineProperty(GLOB, 'appId', { |
| | | writable: false, |
| | | value: GLOB.appId |