diff --git a/ZR.Admin.WebApi/Controllers/CommonController.cs b/ZR.Admin.WebApi/Controllers/CommonController.cs index 8854422..21c1cf2 100644 --- a/ZR.Admin.WebApi/Controllers/CommonController.cs +++ b/ZR.Admin.WebApi/Controllers/CommonController.cs @@ -48,7 +48,7 @@ namespace ZR.Admin.WebApi.Controllers public IActionResult Index() { return Ok("看到这里页面说明你已经成功启动了本项目:)\n\n" + - "如果觉得项目有用,打赏作者喝杯咖啡作为奖励\n☛☛http://www.izhaorui.cn/doc\n"); + "如果觉得项目有用,打赏作者喝杯咖啡作为奖励\n☛☛http://www.izhaorui.cn/doc/support.html\n"); } /// diff --git a/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs b/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs index b356982..db9ff1f 100644 --- a/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs +++ b/ZR.Admin.WebApi/Controllers/System/CodeGeneratorController.cs @@ -227,9 +227,11 @@ namespace ZR.Admin.WebApi.Controllers [ActionPermissionFilter(Permission = "tool:gen:preview")] public IActionResult Preview(long tableId = 0, int VueVersion = 0) { - GenerateDto dto = new(); - dto.TableId = tableId; - dto.VueVersion = VueVersion; + GenerateDto dto = new() + { + TableId = tableId, + VueVersion = VueVersion + }; if (dto == null || dto.TableId <= 0) { throw new CustomException(ResultCode.CUSTOM_ERROR, "请求参数为空"); diff --git a/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs b/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs index 6df2ab2..9851d0d 100644 --- a/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs +++ b/ZR.Admin.WebApi/Extensions/SwaggerExtension.cs @@ -21,8 +21,7 @@ namespace ZR.Admin.WebApi.Extensions var url = $"{httpReq.Scheme}://{httpReq.Host.Value}"; var referer = httpReq.Headers["Referer"].ToString(); if (referer.Contains(GlobalConstant.DevApiProxy)) - url = referer.Substring(0, - referer.IndexOf(GlobalConstant.DevApiProxy, StringComparison.InvariantCulture) + GlobalConstant.DevApiProxy.Length - 1); + url = referer[..(referer.IndexOf(GlobalConstant.DevApiProxy, StringComparison.InvariantCulture) + GlobalConstant.DevApiProxy.Length - 1)]; swaggerDoc.Servers = new List {