| | |
| | | const LoginCloudForm = asyncLoadComponent(() => import('./logincloudform')) |
| | | const iszhCN = localStorage.getItem('lang') !== 'en-US' |
| | | |
| | | const _href = window.location.href.split('#')[0] |
| | | if (localStorage.getItem(_href + 'paramsmain')) { |
| | | sessionStorage.setItem('history', localStorage.getItem(_href + 'paramsmain')) |
| | | localStorage.removeItem(_href + 'paramsmain') |
| | | } |
| | | |
| | | class Login extends Component { |
| | | state = { |
| | | selectedlang: iszhCN ? 'zh-CN' : 'en-US', |
| | |
| | | localStorage.removeItem(_url) |
| | | } |
| | | |
| | | if (this.props.location.state && this.props.location.state.from.pathname) { |
| | | // if (this.props.location.state && this.props.location.state.from.pathname) { |
| | | // // 查看是否为其他页面跳转,路径存在时,跳回原页面 |
| | | // this.props.history.replace(this.props.location.state.from.pathname) |
| | | // } |
| | | |
| | | let _history = sessionStorage.getItem('history') |
| | | if (_history) { |
| | | sessionStorage.removeItem('history') |
| | | // 查看是否为其他页面跳转,路径存在时,跳回原页面 |
| | | this.props.history.replace(this.props.location.state.from.pathname) |
| | | this.props.history.replace(_history) |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | } |
| | |
| | | |
| | | localStorage.setItem('lang', param.lang || 'zh-CN') |
| | | |
| | | if (this.props.location.state && this.props.location.state.from.pathname) { |
| | | let _history = sessionStorage.getItem('history') |
| | | if (_history) { |
| | | sessionStorage.removeItem('history') |
| | | // 查看是否为其他页面跳转,路径存在时,跳回原页面 |
| | | this.props.history.replace(this.props.location.state.from.pathname) |
| | | this.props.history.replace(_history) |
| | | } else { |
| | | this.props.history.replace('/main') |
| | | } |
| | |
| | | }) |
| | | |
| | | window.GLOB.mainlogo = systemMsg.mainlogo |
| | | window.GLOB.style = systemMsg.style |
| | | |
| | | if (window.GLOB.style && options.styles[window.GLOB.style]) { |
| | | document.getElementById('root').className = options.styles[window.GLOB.style] |
| | | } |
| | | |
| | | if (res.titlelogo && window.GLOB.favicon !== res.titlelogo) { |
| | | let link = document.querySelector("link[rel*='icon']") || document.createElement('link') |