From cf4787bc8188cd0acc8a42793730b076742f29c1 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 16 四月 2026 17:37:35 +0800
Subject: [PATCH] 新增现场巡查模块(待完成)

---
 services/baseRequset.js |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/services/baseRequset.js b/services/baseRequset.js
index 5282d7b..1aa6214 100644
--- a/services/baseRequset.js
+++ b/services/baseRequset.js
@@ -1,21 +1,24 @@
-import {
-  basePicUrl,
-  baseUrl,
-  baseFileUrl,
-  baseIconUrl,
-  mode,
-} from '../config/index';
+import { basePicUrl, baseUrl, baseFileUrl, baseIconUrl, mode } from '../config/index';
 
 function request(fun, hostUrl) {
   const bUrl = hostUrl ? hostUrl : baseUrl;
-  if (fun.params != undefined) {
+  if (
+    !(
+      fun.params == undefined ||
+      fun.params == 'undefined' ||
+      fun.params == null ||
+      fun.params == 'null'
+    )
+  ) {
     var param = '';
     Object.keys(fun.params).forEach(key => {
       var value = fun.params[key];
-      if (param == '') {
-        param += key + '=' + value;
-      } else {
-        param += '&' + key + '=' + value;
+      if (!(value == undefined || value == 'undefined' || value == null || value == 'null')) {
+        if (param == '') {
+          param += key + '=' + value;
+        } else {
+          param += '&' + key + '=' + value;
+        }
       }
     });
     var url = fun.url;
@@ -69,3 +72,13 @@
   fun['method'] = 'POST';
   return request(fun, hostUrl);
 }
+
+export function put(fun, hostUrl) {
+  fun['method'] = 'PUT';
+  return request(fun, hostUrl);
+}
+
+export function _delete(fun, hostUrl) {
+  fun['method'] = 'DELETE';
+  return request(fun, hostUrl);
+}

--
Gitblit v1.9.3