Эх сурвалжийг харах

版本管理添加更新信息
get请求获取参数

lcl 3 сар өмнө
parent
commit
dd64ac4d52

BIN
.DS_Store


+ 14 - 1
Filters/AuthorizationFilter.cs

@@ -35,7 +35,7 @@ namespace Filters
                 if(context.HttpContext.Request.Method.ToLower() == "get")
                 {
                     content = context.HttpContext.GetQueryString();
-                    content = content.Substring(content.IndexOf("=") + 1);
+                    content = GetParam(content, "value");
                     content = HttpUtility.UrlDecode(content);
                     content = Decrypt(content);
                     content = HttpUtility.UrlDecode(content);
@@ -133,5 +133,18 @@ namespace Filters
             str = Encoding.UTF8.GetString(Convert.FromBase64String(str));
             return Dbconn.AesDecrypt(str, Base.GlobalConstant.ApiKey, Base.GlobalConstant.ApiIv);
         }
+
+        public string GetParam(string content, string key)
+        {
+            string[] data = content.Split('&');
+            foreach(string sub in data)
+            {
+                if(sub.StartsWith(key + "="))
+                {
+                    return sub.Substring(sub.IndexOf("=") + 1);
+                }
+            }
+            return "";
+        }
     }
 }

+ 6 - 0
Model/Vo/AppVersionQueryVo.cs

@@ -44,6 +44,12 @@ namespace Vo
         public string downloadUrl { get; set; }
 
 
+        /// <summary>
+        /// 更新信息
+        /// </summary>
+        public string info { get; set; }
+
+
 
     }
 }