| | |
| | | const Resetpwd = asyncLoadComponent(() => import('@/components/resetPassword')) |
| | | const LoginCloudForm = asyncComponent(() => import('./logincloudform')) |
| | | |
| | | const _href = window.location.href.split('#')[0] |
| | | |
| | | class Login extends Component { |
| | | state = { |
| | | isDisabled: false, |
| | |
| | | window.GLOB.externalDatabase = `[${res.paas_externalDatabase}]..` |
| | | } |
| | | |
| | | localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') |
| | | sessionStorage.setItem('lang', param.lang || 'zh-CN') |
| | | |
| | | sessionStorage.removeItem('visitorUserID') |
| | | sessionStorage.removeItem('visitorLoginUID') |
| | | |
| | | let users = localStorage.getItem(_href + 'users') |
| | | let users = localStorage.getItem(window.GLOB.sysSign + 'users') |
| | | |
| | | if (users) { |
| | | try { |
| | |
| | | |
| | | users.unshift({username: param.username, password: param.remember ? param.password : ''}) |
| | | |
| | | localStorage.setItem(_href + 'users', window.btoa(window.encodeURIComponent(JSON.stringify(users)))) |
| | | localStorage.setItem(window.GLOB.sysSign + 'users', window.btoa(window.encodeURIComponent(JSON.stringify(users)))) |
| | | |
| | | let level = localStorage.getItem(_href + 'pwdlevel') |
| | | let level = localStorage.getItem(window.GLOB.sysSign + 'pwdlevel') |
| | | |
| | | if (level && process.env.NODE_ENV === 'production') { |
| | | let visible = false |
| | |
| | | sessionStorage.setItem('externalDatabase', res.paas_externalDatabase) |
| | | window.GLOB.externalDatabase = `[${res.paas_externalDatabase}]..` |
| | | } |
| | | |
| | | localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') |
| | | sessionStorage.setItem('lang', param.lang || 'zh-CN') |
| | | |
| | | sessionStorage.removeItem('visitorUserID') |
| | | sessionStorage.removeItem('visitorLoginUID') |
| | |
| | | } |
| | | } |
| | | |
| | | const _addressUrl = _href + 'queryAddress' |
| | | const _addressUrl = window.location.href.split('#')[0] + 'queryAddress' |
| | | |
| | | if (localStorage.getItem(_addressUrl) === 'true') { |
| | | this.queryAddress() |
| | | } |
| | | |
| | | const timeStamp = new Date().getTime() |
| | | const _authUrl = _href + 'AuthCode' |
| | | const _authUrl = window.location.href.split('#')[0] + 'AuthCode' |
| | | |
| | | let authCode = localStorage.getItem(_authUrl) |
| | | let _s = md5('mksoft' + moment().format('YYYYMMDD')) |
| | |
| | | lictime = Math.floor(new Date(lictime).getTime() / 86400000) |
| | | let curtime = Math.floor(new Date().getTime() / 86400000) |
| | | let licday = lictime - curtime |
| | | let _mindUrl = _href + 'notMind' |
| | | let _mindUrl = window.location.href.split('#')[0] + 'notMind' |
| | | |
| | | if (licday < 0 || isNaN(licday)) { |
| | | Modal.warning({ |
| | |
| | | localStorage.setItem(_authUrl, box) |
| | | |
| | | if (res.e_files === 'true') { |
| | | localStorage.setItem(_href + 'files', md5(_href + 'files')) |
| | | localStorage.setItem(_href + 'filesDate', res.e_files_end_date) |
| | | localStorage.setItem(window.GLOB.sysSign + 'files', md5(window.GLOB.sysSign + 'files')) |
| | | localStorage.setItem(window.GLOB.sysSign + 'filesDate', res.e_files_end_date) |
| | | window.GLOB.storeFiles = true |
| | | window.GLOB.storeDate = Math.ceil((new Date(res.e_files_end_date).getTime() - new Date().getTime()) / 86400000) |
| | | } else { |
| | | localStorage.removeItem(_href + 'files') |
| | | localStorage.removeItem(window.GLOB.sysSign + 'files') |
| | | window.GLOB.storeFiles = false |
| | | } |
| | | |
| | |
| | | } |
| | | } else { |
| | | localStorage.removeItem(_authUrl) |
| | | localStorage.removeItem(_href + 'files') |
| | | localStorage.removeItem(window.GLOB.sysSign + 'files') |
| | | window.GLOB.storeFiles = false |
| | | |
| | | this.setState({ |
| | |
| | | res.menu_type = 'shutter' |
| | | } |
| | | |
| | | let _url = _href + 'system' |
| | | let systemMsg = { |
| | | favicon: res.titlelogo || '', |
| | | platTitle: res.titleName || '', |
| | |
| | | level = '' |
| | | } |
| | | |
| | | localStorage.setItem(_href + 'pwdlevel', level) |
| | | localStorage.setItem(window.GLOB.sysSign + 'pwdlevel', level) |
| | | |
| | | if (res.srcid) { |
| | | localStorage.setItem(_href + 'srcId', res.srcid) |
| | | localStorage.setItem(window.GLOB.sysSign + 'srcId', res.srcid) |
| | | } else { |
| | | localStorage.removeItem(_href + 'srcId') |
| | | localStorage.removeItem(window.GLOB.sysSign + 'srcId') |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color || '') |
| | |
| | | document.title = systemMsg.platTitle |
| | | |
| | | try { |
| | | localStorage.setItem(_url, window.btoa(window.encodeURIComponent(JSON.stringify(systemMsg)))) |
| | | localStorage.setItem(window.GLOB.sysSign + 'system', window.btoa(window.encodeURIComponent(JSON.stringify(systemMsg)))) |
| | | } catch (e) { |
| | | localStorage.removeItem(_url) |
| | | localStorage.removeItem(window.GLOB.sysSign + 'system') |
| | | } |
| | | |
| | | |
| | | if (res.lang_translation_js && res.lang_data && res.lang_data[0] && (res.lang_data.length > 1 || res.lang_data[0].Lang !== 'zh-CN')) { |
| | | let lang = sessionStorage.getItem('lang') |
| | |
| | | } |
| | | }) |
| | | |
| | | localStorage.setItem(_href + 'js_trans', JSON.stringify(js_trans)) |
| | | localStorage.setItem(window.GLOB.sysSign + 'js_trans', JSON.stringify(js_trans)) |
| | | } |
| | | |
| | | let _loginurl = _href + 'loginways' |
| | | let _loginurl = window.GLOB.sysSign + 'loginways' |
| | | let login_ways = [] |
| | | if (res.login_ways && res.login_ways.length > 0) { |
| | | res.login_ways.forEach(item => { |
| | |
| | | sessionStorage.setItem('subLangList', JSON.stringify(list)) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (res.lang_data.length === 1 && res.lang_data[0].Lang !== sessionStorage.getItem('lang')) { |
| | | localStorage.setItem(window.location.href.split('#')[0] + 'lang', res.lang_data[0].Lang) |
| | | sessionStorage.setItem('lang', res.lang_data[0].Lang) |
| | | window.location.reload() |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | } |
| | | }) |
| | | |
| | | let loginWays = localStorage.getItem(_href + 'loginways') |
| | | let loginWays = localStorage.getItem(window.GLOB.sysSign + 'loginways') |
| | | if (loginWays) { |
| | | try { |
| | | loginWays = JSON.parse(window.decodeURIComponent(window.atob(loginWays))) |