Browse Source

修复500bug

lcl 11 months ago
parent
commit
1430f7b808
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Areas/Web/Controllers/PageController.cs

+ 5 - 1
Areas/Web/Controllers/PageController.cs

@@ -50,7 +50,11 @@ namespace MySystem.Areas.Web.Controllers
 
             AppResultJson result = (AppResultJson)new Api.Controllers.PageUpdateInfoController(_accessor, _logger, _setting).CheckDo("{\"Url\":\"" + Url.Replace("_", "#") + "\",\"Kind\":\"" + Kind + "\",\"apptype\":\"web\",\"version\":\"1.00\"}").Value;
             Dictionary<string, string> Obj = result.Data as Dictionary<string, string>;
-            string ModuleContent = Obj["ModuleContent"];
+            string ModuleContent = "";
+            if(Obj.ContainsKey("ModuleContent"))
+            {
+                ModuleContent = Obj["ModuleContent"];
+            }
             if (Url == "user-maker-policy" && !string.IsNullOrEmpty(Id))
             {
                 ModuleContent = ModuleContent.Replace("getCookieInfo('pageId')", Id);