无人机管理后台前端(已迁走)
a5f41a9dbd0eed8545d842a8c4ced75f17befac1..f38d736bb48c2bdef300f571c28b73f96be4de8b
2025-12-02 罗广辉
Merge remote-tracking branch 'origin/feature/v8.0/8.0.4' into feature/v8.0/...
f38d73 diff | tree
2025-12-02 罗广辉
feat: 后端说任务管理如果code一致就不传
e109b8 diff | tree
1 files modified
19 ■■■■■ changed files
src/axios.js 19 ●●●●● patch | view | raw | blame | history
src/axios.js
@@ -50,6 +50,25 @@
        `${website.clientId}:${website.clientSecret}`
      )}`;
    }
    // 后端的要求
    if (router.currentRoute.value.path === '/job/jobstatistics'){
      const userAreaCode = store?.state?.user?.userInfo?.detail?.areaCode
      const paramsKey = config.method === 'get' ? 'params' : 'data';
      const codeKey = config.method === 'get' ? 'areaCode' : 'area_code';
      const paramCode = config?.params?.areaCode || config?.data?.area_code
      try {
        if (paramCode){
          if (paramCode === userAreaCode) {
            config[paramsKey][codeKey] = config.method === 'get' ? '' : undefined;
          } else {
            if (!Array.isArray(config[paramsKey])){
              config[paramsKey] = {...config[paramsKey],[codeKey]: paramCode}
            }
          }
        }
      }catch (e) {}
    }
    //headers判断请求是否携带token
    const meta = config.meta || {};
    const isToken = meta.isToken === false;