李昊 vor 4 Jahren
Ursprung
Commit
1b12d8c138
1 geänderte Dateien mit 11 neuen und 2 gelöschten Zeilen
  1. 11 2
      GxPress/Api/GxPress.Api/AppControllers/AboutController.cs

+ 11 - 2
GxPress/Api/GxPress.Api/AppControllers/AboutController.cs

@@ -20,13 +20,22 @@ namespace GxPress.Api.AppControllers
         [HttpGet("info")]
         public AboutResult About()
         {
-            var addressUrlDownload=  ConfigHelper.GetValue("ServiceAddress:AddressUrlDownload");
+            var addressUrlDownload = ConfigHelper.GetValue("ServiceAddress:AddressUrlDownload");
             var aboutResult = new AboutResult
             {
                 AboutUrl = StringUtils.AddDomain("/static/aboutus.html"),
-                DownloadUrl =StringUtils.AddDomain($"{addressUrlDownload}/mobile/download")
+                DownloadUrl = StringUtils.AddDomain($"{addressUrlDownload}/mobile/download")
             };
             return aboutResult;
         }
+        [HttpGet("register")]
+        [AllowAnonymous]
+        public bool IsRegister()
+        {
+            var isRegisterValue = ConfigHelper.GetValue("ServiceAddress:IsRegister");
+            if (bool.TryParse(isRegisterValue, out bool isRegister))
+                return isRegister;
+            return false;
+        }
     }
 }