From c2b88a03f3d0d5ebe92949e64d17ee4d0ac3f6b7 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 09 九月 2025 15:14:00 +0800
Subject: [PATCH] 发货清空缓存站点
---
zy-asrs-admin/src/utils/request.js | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/zy-asrs-admin/src/utils/request.js b/zy-asrs-admin/src/utils/request.js
index 54d11b0..57f0ed3 100644
--- a/zy-asrs-admin/src/utils/request.js
+++ b/zy-asrs-admin/src/utils/request.js
@@ -7,9 +7,12 @@
})
export const get = async (url, params) => {
- if (params?.condition != null || params?.condition != undefined) {
- params.current = 1
- }
+ // if (params?.condition != null && params?.condition != undefined && params?.condition != "") {
+ // params.current = 1
+ // }
+ // if (params?._param != null && params?._param != undefined && hasNonEmptyProperty(params?._param)) {
+ // data.current = 1
+ // }
return instance({
url: url,
@@ -21,11 +24,20 @@
})
}
-export const post = async (url, data) => {
- if (data?.condition != null || data?.condition != undefined) {
- data.current = 1
- }
+function hasNonEmptyProperty(obj) {
+ return Object.values(obj).some(value => {
+ // 瀹氫箟浣曚负"涓嶄负绌�" - 鏍规嵁闇�姹傝皟鏁�
+ return value !== null && value !== undefined && value !== '';
+ });
+}
+export const post = async (url, data) => {
+ // if (data?.condition != null && data?.condition != undefined && data?.condition != "") {
+ // data.current = 1
+ // }
+ // if (data._param != null && data._param != undefined && hasNonEmptyProperty(data?._param)) {
+ // data.current = 1
+ // }
return instance({
url: url,
method: 'post',
--
Gitblit v1.9.1