| | |
| | | * @param {Object} param 用户名密码等信息 |
| | | */ |
| | | async loginsubmit (param) { |
| | | if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址 |
| | | Modal.warning({ |
| | | title: '未设置单点服务器地址,请联系管理员!' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let ipAddress = sessionStorage.getItem('ipAddress') || '' |
| | | |
| | |
| | | } |
| | | |
| | | async phoneloginsubmit (param) { |
| | | if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址 |
| | | Modal.warning({ |
| | | title: '未设置单点服务器地址,请联系管理员!' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let ipAddress = sessionStorage.getItem('ipAddress') || '' |
| | | |
| | |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('localRole_id', res.role_id || '') |
| | | |
| | | let _url = window.location.href.split('#')[0] |
| | | |
| | | localStorage.setItem(_url + 'lang', param.lang || 'zh-CN') |
| | | localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') |
| | | sessionStorage.setItem('lang', param.lang || 'zh-CN') |
| | | |
| | | sessionStorage.removeItem('visitorUserID') |
| | |
| | | } |
| | | |
| | | authLogin = (appid, openid, memberid, scanId) => { |
| | | if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址 |
| | | Modal.warning({ |
| | | title: '未设置单点服务器地址,请联系管理员!' |
| | | }) |
| | | return |
| | | } |
| | | Api.getTouristMsg(appid, openid, memberid, scanId).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | |
| | | // if (!res || !res.ip) return |
| | | // sessionStorage.setItem('ipAddress', res.ip) |
| | | // }) |
| | | const _addressUrl = window.location.href.split('#')[0] + 'queryAddress' |
| | | if (sessionStorage.getItem('loginError')) { |
| | | try { |
| | | let res = JSON.parse(sessionStorage.getItem('loginError')) |
| | | console.info(res.url) |
| | | console.info(res.request) |
| | | console.info(res.response) |
| | | |
| | | let result = JSON.parse(res.response) |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } catch (e) {} |
| | | |
| | | setTimeout(() => { |
| | | sessionStorage.removeItem('loginError') |
| | | }, 2000) |
| | | } |
| | | |
| | | const _addressUrl = _href + 'queryAddress' |
| | | |
| | | if (localStorage.getItem(_addressUrl) !== 'true') { |
| | | sessionStorage.setItem('city', '') |
| | |
| | | } |
| | | |
| | | const timeStamp = new Date().getTime() |
| | | const _authUrl = window.location.href.split('#')[0] + 'AuthCode' |
| | | const _authUrl = _href + 'AuthCode' |
| | | |
| | | let authCode = localStorage.getItem(_authUrl) |
| | | let _s = md5('mksoft' + moment().format('YYYYMMDD')) |
| | |
| | | keys[char] = (offset + i) % 10 |
| | | } |
| | | |
| | | let lictime = +key2.replace(/[A-Z]/ig, (s) => { |
| | | let lictime = key2.replace(/[A-Z]/ig, (s) => { |
| | | return keys[s] |
| | | }) |
| | | let curtime = +moment().format('YYYYMMDD') |
| | | lictime = lictime.slice(0,4) + '/' + lictime.slice(4,6) + '/' + lictime.slice(6) |
| | | lictime = Math.floor(new Date(lictime).getTime() / 86400000) |
| | | let curtime = Math.floor(new Date().getTime() / 86400000) |
| | | let licday = lictime - curtime |
| | | let _mindUrl = window.location.href.split('#')[0] + 'notMind' |
| | | let _mindUrl = _href + 'notMind' |
| | | |
| | | if (licday < 0 || isNaN(licday)) { |
| | | Modal.warning({ |
| | |
| | | res.indexlogo = res.indexlogo ? res.indexlogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : '' |
| | | res.loginlogo = res.loginlogo ? res.loginlogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : '' |
| | | |
| | | if (/^https/.test(window.location.protocol)) { // https转换 |
| | | res.Banner = res.Banner ? res.Banner.replace(/^http:/ig, 'https:') : '' |
| | | res.doclogo = res.doclogo ? res.doclogo.replace(/^http:/ig, 'https:') : '' |
| | | res.indexlogo = res.indexlogo ? res.indexlogo.replace(/^http:/ig, 'https:') : '' |
| | | res.loginlogo = res.loginlogo ? res.loginlogo.replace(/^http:/ig, 'https:') : '' |
| | | res.titlelogo = res.titlelogo ? res.titlelogo.replace(/^http:/ig, 'https:') : '' |
| | | } |
| | | |
| | | let _url = window.location.href.split('#')[0] + 'system' |
| | | let _url = _href + 'system' |
| | | let systemMsg = { |
| | | favicon: res.titlelogo || '', |
| | | platTitle: res.titleName || '', |
| | |
| | | level = '' |
| | | } |
| | | |
| | | localStorage.setItem(window.location.href.split('#')[0] + 'pwdlevel', level) |
| | | localStorage.setItem(_href + 'pwdlevel', level) |
| | | |
| | | if (res.srcid) { |
| | | localStorage.setItem(_href + 'srcId', res.srcid) |
| | | } else { |
| | | localStorage.removeItem(_href + 'srcId') |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color || '') |
| | | if (res.sys_datetime) { |
| | |
| | | localStorage.removeItem(_url) |
| | | } |
| | | |
| | | let _loginurl = window.location.href.split('#')[0] + 'loginways' |
| | | let _loginurl = _href + 'loginways' |
| | | let login_ways = [] |
| | | let login_types = [] |
| | | if (res.login_ways && res.login_ways.length > 0) { |
| | |
| | | } |
| | | }) |
| | | |
| | | let loginWays = localStorage.getItem(window.location.href.split('#')[0] + 'loginways') |
| | | let loginWays = localStorage.getItem(_href + 'loginways') |
| | | if (loginWays) { |
| | | try { |
| | | loginWays = JSON.parse(window.decodeURIComponent(window.atob(loginWays))) |