forked from drone/command-center-dashboard

zhongrj
2025-03-31 9775bbbc9e7a9574e2d79d69460e2f50ba867430
src/axios.js
@@ -48,6 +48,7 @@
    if (!isURL(config.url) && !config.url.startsWith(baseUrl)) {
      config.url = baseUrl + config.url;
    }
    config.headers['areaCode'] = store.state.user.selectedAreaCode;
    //安全请求header
    config.headers['Blade-Requested-With'] = 'BladeHttpRequest';
    //headers判断是否需要
@@ -57,6 +58,10 @@
        `${website.clientId}:${website.clientSecret}`
      )}`;
    }
    // 根据后端要求,post的data为空的话传{}
    if (config.method === 'post') {
      config.data = config.data || {};
    }
    //headers判断请求是否携带token
    const meta = config.meta || {};
    const isToken = meta.isToken === false;