| | |
| | | } |
| | | |
| | | sessionStorage.clear() |
| | | sessionStorage.setItem('loginError', JSON.stringify({request: res.config ? res.config.data : '', response: JSON.stringify(res.data)})) |
| | | sessionStorage.setItem('loginError', JSON.stringify({url: res.config ? res.config.url : '', request: res.config ? res.config.data : '', response: JSON.stringify(res.data)})) |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login') |
| | | window.location.reload() |
| | | } |
| | |
| | | if (window.debugger === true) { |
| | | response.data.ErrCode = 'E' |
| | | return Promise.resolve(response.data) |
| | | } else { |
| | | } else if (!sessionStorage.getItem('loginError')) { |
| | | setCurrentUrl(response) |
| | | } |
| | | } else { |
| | |
| | | func: 's_visitor_login', |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | SessionUid: _SessionUid, |
| | | TypeCharOne: 'pc' |
| | | TypeCharOne: 'pc', |
| | | kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)) |
| | | } |
| | | |
| | | param.LText = md5(window.btoa(_SessionUid + param.timestamp)) |
| | |
| | | way_no: 'sms_vcode', |
| | | systemType: options.sysType, |
| | | login_city: city, |
| | | login_id_address: ipAddress |
| | | login_id_address: ipAddress, |
| | | kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)), |
| | | device_id: localStorage.getItem('SessionUid') |
| | | } |
| | | |
| | | param.appkey = window.GLOB.appkey || '' |
| | |
| | | systemType: options.sysType, |
| | | Type: 'S', |
| | | login_city: city, |
| | | login_id_address: ipAddress |
| | | login_id_address: ipAddress, |
| | | kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)), |
| | | device_id: localStorage.getItem('SessionUid') |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | CacheUtils.updateWebSqlversion('1.00', curTime) |
| | | CacheUtils.clearIndexDBConfig() |
| | | CacheUtils.updateIndexDBversion({version: '1.00', createDate: curTime}) |
| | | CacheUtils.clearFuncs(options.sysType) |
| | | } |
| | | |
| | | /** |
| | |
| | | param.lang = param.lang || sessionStorage.getItem('lang') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | param.appkey = param.appkey || window.GLOB.appkey |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 编辑状态,且存在云端地址 |
| | |
| | | } |
| | | }) |
| | | param.sign = md5(values) |
| | | param.t = new Date().getTime() |
| | | param.t = new Date().getTime(); |
| | | |
| | | ['arr_field', 'LText_field', 'custom_script', 'LText1', 'LText', 'LText2', 'DateCount'].forEach(key => { |
| | | if (param[key]) { |
| | | let val = param[key] |
| | | delete param[key] |
| | | param[key] = val |
| | | } |
| | | }) |
| | | |
| | | return param |
| | | } |
| | |
| | | * @param {Object} param 请求参数 |
| | | * @param {Boolean} SSO 是否为单点登录地址 |
| | | */ |
| | | getSystemCacheConfig (param) { |
| | | getSystemCacheConfig (param, cache = true) { |
| | | param.userid = param.userid || sessionStorage.getItem('UserID') || '' |
| | | param.lang = param.lang || sessionStorage.getItem('lang') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | |
| | | _param = JSON.stringify(_param) |
| | | _param = md5(_param) |
| | | |
| | | if (window.GLOB.CacheMap.has(_param)) { |
| | | if (cache && window.GLOB.CacheMap.has(_param)) { |
| | | return Promise.resolve(window.GLOB.CacheMap.get(_param)) |
| | | } else { |
| | | param = this.encryptParam(param) |