From e32da8209870f65c79a8ab61e570082e5732dea8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 04 三月 2025 10:15:13 +0800
Subject: [PATCH] 2025-03-04

---
 src/tabviews/custom/index.jsx |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 075b3ad..746f9c8 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -225,21 +225,19 @@
         }
       }
 
+      if (config.urlFields && config.urlFields.length) {
+        config.urlFields.forEach(field => {
+          let key = field.toLowerCase()
+          if (urlparam[key] !== undefined) return
+
+          urlparam[key] = ''
+        })
+      }
+
       window.GLOB.CacheData.set(MenuID, urlparam)
 
       if (window.backend && config.allSqls) {
         let keys = Object.keys(urlparam)
-
-        if (config.urlFields && config.urlFields.length) {
-          config.urlFields.forEach(field => {
-            let key = field.toLowerCase()
-            if (keys.includes(key)) return
-
-            keys.push(key)
-            urlparam[key] = ''
-          })
-        }
-
         config.allSqls.forEach(item => {
           item.id = md5(window.GLOB.appkey + item.v_id)
           if (['datasource', 'interface', 'excelOut'].includes(item.type)) {
@@ -269,7 +267,7 @@
       }
       if (config.urlFields) {
         config.urlFields.forEach(field => {
-          let val = `'${urlparam[field.toLowerCase()] || ''}'`
+          let val = `'${urlparam[field.toLowerCase()]}'`
           regs.push({
             reg: new RegExp('@' + field + '@', 'ig'),
             value: val

--
Gitblit v1.8.0