峰峰执法平台简易案件程序板块 pad端
付延余
2023-01-03 3b1fc9088c6efc28bbfdab55b61b1626a863036d
src/router/axios.js
@@ -21,7 +21,7 @@
NProgress.configure({
  showSpinner: false
})
let loadingInstance =null;
let loadingInstance = null;
// HTTPrequest拦截
axios.interceptors.request.use(config => {
  /*NProgress.start() // start progress bar
@@ -33,8 +33,8 @@
 });*/
  const TENANT_ID = getStore({ name: 'tenantId' })
  const isToken = (config.headers || {}).isToken === false
  const token = window.android.getAppToken()
  // const token = `59866cb8-c5ba-4b2f-a367-3ab2f64f30c5`
  // const token = window.android.getAppToken()
  const token = `8d3bcce6-c27b-4f98-92a7-12b3b9a02306`
  if (token && !isToken) {
    config.headers['Authorization'] = 'Bearer ' + token// token
  }
@@ -48,13 +48,13 @@
    delete config.data.serialize
  }
  // config.headers['VERSION'] = 'GHX'
  if (config.method === 'get'||config.params) {
  if (config.method === 'get' || config.params) {
    config.paramsSerializer = function (params) {
      let p ={};
      for(let i in params){
        if(typeof params[i] == 'string' &&!params[i]){
      let p = {};
      for (let i in params) {
        if (typeof params[i] == 'string' && !params[i]) {
        }else{
        } else {
          p[i] = params[i]
        }
      }