king
2023-11-09 9cd5459dfadf73ac9ece9b3ecee0ea6d9d15d829
src/api/index.js
@@ -46,6 +46,7 @@
        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')
@@ -94,6 +95,25 @@
  }
  /**
   * @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 = '') {
@@ -359,7 +379,6 @@
  }
  /**
<<<<<<< HEAD
   * @description 登录二次验证 // positecgroup
   */
  verifycode (verify) {
@@ -391,9 +410,6 @@
  /**
   * @description 获取系统版本信息,启用或更新websql
=======
   * @description 获取系统版本信息
>>>>>>> master
   */
  getAppVersion (reload) {
    if (!window.GLOB.IndexDB) {
@@ -698,7 +714,7 @@
  /**
   * @description 获取系统配置,优先从缓存中取值,增加appkey
   * @param {Object}  param   请求参数
   * @param {Boolean} SSO     是否为单点登录地址
   * @param {Boolean} cache   是否使用缓存
   */
  getSystemCacheConfig (param, cache = true) {
    param.userid = param.userid || sessionStorage.getItem('UserID') || ''
@@ -1093,6 +1109,8 @@
      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)
    }
@@ -1138,6 +1156,8 @@
        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)
      }, () => {