From 457f9c817adef8b003ee6379f493798bae5cbb69 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期一, 19 五月 2025 09:31:19 +0800
Subject: [PATCH] 修改

---
 src/util/request.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/util/request.js b/src/util/request.js
index d8e08f5..a935bed 100644
--- a/src/util/request.js
+++ b/src/util/request.js
@@ -3,6 +3,7 @@
 import { Session } from '@/util/storage';
 import {message} from "ant-design-vue";
 import { loginOut } from "@/api/login";
+import JSONBig from 'json-bigint';
 //用来拦截用的
 axios.defaults.headers.post["Content-Type"] = "application/json;charset=utf-8";
 //创建一个单例
@@ -11,6 +12,16 @@
 const http= axios.create({
     baseURL: baseUrl,
     timeout: 50000,//响应时间
+    transformResponse: [
+        function (data) {
+            // 对 data 进行任意转换处理
+            try {
+                return JSONBig.parse(data)
+            } catch (err) {
+                return data
+            }
+        }
+    ]
     // headers:{"Content-Type":"application/json;charset=utf-8"},
 })
 

--
Gitblit v1.9.2