king
2025-04-08 78db2a9b5e94b8a95f0735596e38410c24f990ea
src/api/index.js
@@ -48,10 +48,12 @@
        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')
            window.location.reload()
          if (!/#\/login/.test(window.location.href)) {
            sessionStorage.clear()
            if (!!(window.history && window.history.pushState)) {
              window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
              window.location.reload()
            }
          }
        }
      })
@@ -59,6 +61,10 @@
    return Promise.reject(response.data)
  } else {
    if (response.data.ErrCode === 'E' && /死锁/.test(response.data.message)) {
      response.data.message = '服务器繁忙,请稍后重试!'
      response.data.ErrMesg = '服务器繁忙,请稍后重试!'
    }
    if (response.config.requestId) {
      response.data.$requestId = response.config.requestId
    }
@@ -214,6 +220,9 @@
      } else {
        param.linkurl = window.GLOB.linkurl
      }
    } else if (binding_type === 'cloud') { // 登录云端
      delete param.rduri
      url = window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) + '/webapi/dologon/s_visitor_login'
    }
    
    param.LText = md5(window.btoa(_SessionUid + param.timestamp + (param.linkurl || '')))