Browse Source

get请求参数,对象类型处理

lichunlei 8 months ago
parent
commit
dd6e9bbe6d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Common/Function.cs
  2. 1 1
      Filters/DecryptMiddleware.cs

+ 1 - 1
Common/Function.cs

@@ -1167,7 +1167,7 @@ namespace Common
             return path + filename;
         }
 
-        public static String BuildQueryString(SortedList<String, String> kvp)
+        public static String BuildQueryString(SortedList<String, Object> kvp)
         {
             return String.Join("&", kvp.Select(item => String.Format("{0}={1}", item.Key.Trim(), item.Value)).ToArray());
         }

+ 1 - 1
Filters/DecryptMiddleware.cs

@@ -112,7 +112,7 @@ namespace Filters
 
         public static string GetParams(string content)
         {
-            SortedList<string, string> req = Newtonsoft.Json.JsonConvert.DeserializeObject<SortedList<string, string>>(content);
+            SortedList<string, object> req = Newtonsoft.Json.JsonConvert.DeserializeObject<SortedList<string, object>>(content);
             return Function.BuildQueryString(req);
         }
     }