提交代码

This commit is contained in:
zpc 2025-08-11 13:11:42 +08:00
parent f695fbbdc6
commit 411d2726eb
4 changed files with 12 additions and 23 deletions

View File

@ -55,27 +55,9 @@ namespace ZR.Admin.WebApi.Extensions
Title = "ZrAdmin.NET Api",
Version = "v1",
Description = "系统管理",
Contact = new OpenApiContact { Name = "ZRAdmin doc", Url = new Uri("https://www.izhaorui.cn/doc") }
});
c.SwaggerDoc("article", new OpenApiInfo
{
Title = "ZrAdmin.NET Api",
Version = "v1",
Description = "文章管理",
Contact = new OpenApiContact { Name = "ZRAdmin doc", Url = new Uri("https://www.izhaorui.cn/doc") }
});
c.SwaggerDoc("shopping", new OpenApiInfo
{
Title = "ZrAdmin.NET Api",
Version = "v1",
Description = "商城管理",
});
c.SwaggerDoc("v1", new OpenApiInfo
{
Title = "ZrAdmin.NET Api",
Version = "v1",
Description = "",
Contact = new OpenApiContact { Name = "Admin doc", Url = new Uri("") }
});
try
{
//var tempPath = hostEnvironment.ContentRootPath;

View File

@ -79,7 +79,11 @@ if (openRedis == "1")
{
RedisServer.Initalize();
}
var GaoDeKey = builder.Configuration["GaoDe:Key"];
if (!string.IsNullOrEmpty(GaoDeKey))
{
GeoCodeService.ApiKey = GaoDeKey;
}
builder.Services.AddMvc(options =>
{
options.Filters.Add(typeof(GlobalActionMonitor));//全局注册

View File

@ -108,6 +108,9 @@
"CaptchaOptions": {
"IgnoreCase": true //
},
"GaoDe": {
"Key": "938a85a1cc3114b200522fb7ee579b27" //key
},
//
"CodeGen": {
//uniapp 2/3(vue)

View File

@ -10,8 +10,8 @@ namespace ZR.Common;
/// </summary>
public class GeoCodeService
{
private const string ApiKey = "675b1cc0e0d2e61fd475b668b9fd869d";
private const string BaseUrl = "https://restapi.amap.com/v3/geocode/regeo";
public static string ApiKey = "938a85a1cc3114b200522fb7ee579b27";
public const string BaseUrl = "https://restapi.amap.com/v3/geocode/regeo";
private readonly HttpClient _httpClient;