| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import options, { styles } from '@/store/options.js' |
| | | import zhCN from '@/locales/zh-CN/login.js' |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import asyncLoadComponent from '@/utils/asyncLoadComponent' |
| | |
| | | |
| | | 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')) { |
| | |
| | | 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 { |
| | |
| | | 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) { |
| | |
| | | |
| | | Api.getTouristMsg().then(result => { |
| | | if (result.status) { |
| | | result.UserID && sessionStorage.setItem('UserID', result.UserID) |
| | | result.LoginUID && sessionStorage.setItem('LoginUID', result.LoginUID) |
| | | if (result.UserID && !sessionStorage.getItem('UserID')) { |
| | | sessionStorage.setItem('UserID', result.UserID) |
| | | } |
| | | if (result.LoginUID && !sessionStorage.getItem('LoginUID')) { |
| | | sessionStorage.setItem('LoginUID', result.LoginUID) |
| | | } |
| | | |
| | | if (result.UserID && result.LoginUID) { |
| | | this.setState({touristLogin: true}) |
| | |
| | | mainlogo: res.indexlogo || '', |
| | | doclogo: res.doclogo || '', |
| | | style: res.CSS || '', |
| | | webSite: res.WebSite || '' |
| | | showline: res.split_line_show || 'true', |
| | | webSite: res.WebSite || '', |
| | | navBar: res.menu_type |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color) |
| | |
| | | |
| | | window.GLOB.mainlogo = systemMsg.mainlogo |
| | | window.GLOB.style = systemMsg.style |
| | | window.GLOB.navBar = systemMsg.navBar |
| | | |
| | | if (window.GLOB.style && options.styles[window.GLOB.style]) { |
| | | document.getElementById('root').className = options.styles[window.GLOB.style] |
| | | if (window.GLOB.style && styles[window.GLOB.style]) { |
| | | document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '') |
| | | } |
| | | |
| | | if (res.titlelogo && window.GLOB.favicon !== res.titlelogo) { |
| | |
| | | if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) { |
| | | sessionStorage.setItem('Member_Level', md5('mksoft' + moment().format('YYYYMM') + memberLevel)) |
| | | this.props.modifyMemberLevel(memberLevel) |
| | | } |
| | | |
| | | if (res.users_upt === 'true' && window.GLOB.systemType === 'production') { |
| | | Api.getLocalConfig ({func: 's_Get_local_u_deleted', users_upt_date: res.users_upt_date}).then(localres => { |
| | | if (!localres.status) return |
| | | Api.getSystemConfig({func: 's_get_sso_u_create', user_ids: localres.user_ids, user_ids_local: localres.user_ids_local, users_upt_date: localres.users_upt_date}).then(ssores => { |
| | | if (!ssores.status) return |
| | | Api.getLocalConfig ({func: 's_get_local_u_create', user_ids_local: ssores.user_ids_local}) |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | message.warning(res.message) |
| | |
| | | </div> |
| | | <div className="login-bottom"> |
| | | {webSite && copyRight ? |
| | | <a target="blank" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, ' ') }}></a> : |
| | | <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, ' ') }}></a> : |
| | | <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, ' ') : '' }}></p> |
| | | } |
| | | {ICP ? <p dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, ' ') }}></p> : null} |
| | |
| | | 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} |