zhoufan 4 年之前
父節點
當前提交
eff23183b2

+ 1 - 0
RMYY_CallCenter_Api.Utility/Helper/NPOIHelper.cs

@@ -126,6 +126,7 @@ namespace RMYY_CallCenter_Api.Utility
126 126
                     curContext.Response.ContentType = "application/vnd.ms-excel";
127 127
                     curContext.Response.ContentEncoding = Encoding.UTF8;
128 128
                     curContext.Response.Charset = "";
129
+                    curContext.Response.AppendHeader("Access-Control-Expose-Headers", "Content-Disposition");
129 130
                     curContext.Response.AppendHeader("Content-Disposition",
130 131
                         "attachment;filename=" + HttpUtility.UrlEncode(Name + "_导出文件_" + DateTime.Now.Ticks + ".xls", Encoding.UTF8));
131 132
 

+ 9 - 4
RMYY_CallCenter_Api/Filter/ExceptionFilter.cs

@@ -14,19 +14,24 @@ namespace RMYY_CallCenter_Api.Filter
14 14
             base.OnException(context);
15 15
 
16 16
             var rt = context.RequestContext.HttpContext.Request;
17
+
17 18
             Dictionary<string, string> Params = new Dictionary<string, string>();
18 19
             Params.Add("request_url", rt.Url.ToString());
19 20
 
20
-            foreach (var key in rt.Params.AllKeys)
21
+            if (rt.HttpMethod.ToUpper() != "GET")
21 22
             {
22
-                if (key == "ALL_HTTP")
23
+                foreach (var key in rt.Params.AllKeys)
23 24
                 {
24
-                    break;
25
+                    if (key == "ALL_HTTP")
26
+                    {
27
+                        break;
28
+                    }
29
+                    Params.Add(key, rt.Params[key]);
25 30
                 }
26
-                Params.Add(key, rt.Params[key]);
27 31
             }
28 32
 
29 33
             LogHelper.Error("系统异常,参数:" + Params.ToJson(), context.Exception);
34
+
30 35
             context.ExceptionHandled = true;
31 36
             context.HttpContext.Response.StatusCode = 200;
32 37
             context.Result = new ContentResult { Content = new AjaxResult { state = ResultTypes.error.ToString(), message = "系统异常,请稍后重试" }.ToJson() };

+ 7 - 4
RMYY_CallCenter_Api/Global.asax.cs

@@ -27,13 +27,16 @@ namespace RMYY_CallCenter_Api
27 27
             Dictionary<string, string> Params = new Dictionary<string, string>();
28 28
             Params.Add("request_url", context.Request.Url.ToString());
29 29
 
30
-            foreach (var key in context.Request.Params.AllKeys)
30
+            if (context.Request.HttpMethod.ToUpper() != "GET")
31 31
             {
32
-                if (key == "ALL_HTTP")
32
+                foreach (var key in context.Request.Params.AllKeys)
33 33
                 {
34
-                    break;
34
+                    if (key == "ALL_HTTP")
35
+                    {
36
+                        break;
37
+                    }
38
+                    Params.Add(key, context.Request.Params[key]);
35 39
                 }
36
-                Params.Add(key, context.Request.Params[key]);
37 40
             }
38 41
 
39 42
             if (ConfigHelper.GetValue("IsLog").ToString() == "1")