From 2777b59c3e1d2b9a76f7072a1ceebf7f78eddaff Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 04 Dec 2025 17:05:19 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v8.0/8.0.4' into test

---
 src/axios.js |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/axios.js b/src/axios.js
index 4acc439..3ef44cf 100644
--- a/src/axios.js
+++ b/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;

--
Gitblit v1.9.3