From 63ed4be3bfc8cb59f790abc15a4d9d0b2dd11f86 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 02 Apr 2025 18:45:44 +0800
Subject: [PATCH] chore: 依赖更新

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

diff --git a/src/axios.js b/src/axios.js
index 1a81a71..3f0905f 100644
--- a/src/axios.js
+++ b/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;

--
Gitblit v1.9.3