king
2021-03-12 e2a0980e4a701a3dd07c339ff24ec4221dbed2dd
src/views/login/index.jsx
@@ -15,7 +15,7 @@
const LoginForm = asyncLoadComponent(() => import('./loginform'))
const LoginCloudForm = asyncLoadComponent(() => import('./logincloudform'))
const iszhCN = localStorage.getItem('lang') !== 'en-US'
const iszhCN = sessionStorage.getItem('lang') !== 'en-US'
const _href = window.location.href.split('#')[0]
if (localStorage.getItem(_href + 'paramsmain')) {
@@ -95,11 +95,12 @@
      sessionStorage.setItem('debug', res.debug || '')
      sessionStorage.setItem('role_id', res.role_id || '')
      sessionStorage.setItem('localRole_id', res.role_id || '')
      localStorage.setItem('lang', param.lang || 'zh-CN')
      let _url = window.location.href.split('#')[0]
      localStorage.setItem(_url + 'lang', param.lang || 'zh-CN')
      sessionStorage.setItem('lang', param.lang || 'zh-CN')
      if (param.remember) { // 记住密码时账号密码存入localStorage
        localStorage.setItem(_url, window.btoa(window.encodeURIComponent(JSON.stringify({username: param.username, password: param.password}))))
      } else {
@@ -162,7 +163,10 @@
      sessionStorage.setItem('role_id', res.role_id || '')
      sessionStorage.setItem('localRole_id', res.role_id || '')
      localStorage.setItem('lang', param.lang || 'zh-CN')
      let _url = window.location.href.split('#')[0]
      localStorage.setItem(_url + 'lang', param.lang || 'zh-CN')
      sessionStorage.setItem('lang', param.lang || 'zh-CN')
      let _history = sessionStorage.getItem('history')
      if (_history) {
@@ -291,7 +295,8 @@
              doclogo: res.doclogo || '',
              style: res.CSS || '',
              showline: res.split_line_show || 'true',
              webSite: res.WebSite || ''
              webSite: res.WebSite || '',
              navBar: res.menu_type
            }
            sessionStorage.setItem('home_background', res.index_background_color)
@@ -344,6 +349,7 @@
            window.GLOB.mainlogo = systemMsg.mainlogo
            window.GLOB.style = systemMsg.style
            window.GLOB.navBar = systemMsg.navBar
        
            if (window.GLOB.style && styles[window.GLOB.style]) {
              document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '')
@@ -498,7 +504,7 @@
        </div>
        <div className="login-bottom">
          {webSite && copyRight ?
            <a target="blank" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
            <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
            <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
          }
          {ICP ? <p dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></p> : null}
@@ -510,6 +516,7 @@
          cancelText={this.state.dict['login.auth.cancel']}
          visible={this.state.syncApp}
          onOk={this.syncSubmit}
          maskClosable={false}
          className="sync-cloud-application"
          width={'430px'}
          confirmLoading={this.state.syncing}