| | |
| | | okText: '知道了', |
| | | onOk: () => { |
| | | window.GLOB.$error = false |
| | | |
| | | sessionStorage.clear() |
| | | if (!!(window.history && window.history.pushState)) { |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login') |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 使用dostar接口,跳过验证 |
| | | * @param {Object} param 查询及提交参数 |
| | | */ |
| | | loginAndRedirect (param) { |
| | | let url = '' |
| | | if (process.env.NODE_ENV === 'production') { |
| | | url = document.location.origin + '/Home/LoginAndRedirect' |
| | | } else { |
| | | url = '/Home/LoginAndRedirect' |
| | | } |
| | | |
| | | return axios({ |
| | | url: url, |
| | | method: 'post', |
| | | data: qs.stringify(param) |
| | | }) |
| | | } |
| | | |
| | | /* @description 直接请求 |
| | | * @description 微信业务请求 |
| | | */ |
| | | wxAccessToken (domain = '') { |
| | |
| | | } |
| | | |
| | | /** |
| | | <<<<<<< HEAD |
| | | * @description 登录二次验证 // positecgroup |
| | | */ |
| | | verifycode (verify) { |
| | |
| | | |
| | | /** |
| | | * @description 获取系统版本信息,启用或更新websql |
| | | ======= |
| | | * @description 获取系统版本信息 |
| | | >>>>>>> master |
| | | */ |
| | | getAppVersion (reload) { |
| | | if (!window.GLOB.IndexDB) { |
| | |
| | | /** |
| | | * @description 获取系统配置,优先从缓存中取值,增加appkey |
| | | * @param {Object} param 请求参数 |
| | | * @param {Boolean} SSO 是否为单点登录地址 |
| | | * @param {Boolean} cache 是否使用缓存 |
| | | */ |
| | | getSystemCacheConfig (param, cache = true) { |
| | | param.userid = param.userid || sessionStorage.getItem('UserID') || '' |
| | |
| | | appkey: window.GLOB.appkey || '' |
| | | } |
| | | |
| | | let id = Utils.getuuid() |
| | | sql = sql.replace(/@time_id@/ig, `'${id}'`) |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | sql = sql.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | |
| | | clearTimeout(timer) |
| | | if (/Shared Memory Provider|会话处于终止状态|当前命令发生了严重错误/.test(res.message)) { |
| | | res.message = '验证失败,请检查SQL中是否存在死循环。' |
| | | } else if (res.message.indexOf('EXECUTE 后的事务计数指示 BEGIN 和 COMMIT 语句的数目不匹配。上一计数 = 1,当前计数 = 0') > -1) { |
| | | res.ErrCode = '-2' |
| | | } |
| | | resolve(res) |
| | | }, () => { |