提交代码
This commit is contained in:
parent
f695fbbdc6
commit
411d2726eb
|
|
@ -55,27 +55,9 @@ namespace ZR.Admin.WebApi.Extensions
|
||||||
Title = "ZrAdmin.NET Api",
|
Title = "ZrAdmin.NET Api",
|
||||||
Version = "v1",
|
Version = "v1",
|
||||||
Description = "系统管理",
|
Description = "系统管理",
|
||||||
Contact = new OpenApiContact { Name = "ZRAdmin doc", Url = new Uri("https://www.izhaorui.cn/doc") }
|
Contact = new OpenApiContact { Name = "Admin doc", Url = new Uri("") }
|
||||||
});
|
|
||||||
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 = "",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//var tempPath = hostEnvironment.ContentRootPath;
|
//var tempPath = hostEnvironment.ContentRootPath;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,11 @@ if (openRedis == "1")
|
||||||
{
|
{
|
||||||
RedisServer.Initalize();
|
RedisServer.Initalize();
|
||||||
}
|
}
|
||||||
|
var GaoDeKey = builder.Configuration["GaoDe:Key"];
|
||||||
|
if (!string.IsNullOrEmpty(GaoDeKey))
|
||||||
|
{
|
||||||
|
GeoCodeService.ApiKey = GaoDeKey;
|
||||||
|
}
|
||||||
builder.Services.AddMvc(options =>
|
builder.Services.AddMvc(options =>
|
||||||
{
|
{
|
||||||
options.Filters.Add(typeof(GlobalActionMonitor));//全局注册
|
options.Filters.Add(typeof(GlobalActionMonitor));//全局注册
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,9 @@
|
||||||
"CaptchaOptions": {
|
"CaptchaOptions": {
|
||||||
"IgnoreCase": true // 比较时是否忽略大小写
|
"IgnoreCase": true // 比较时是否忽略大小写
|
||||||
},
|
},
|
||||||
|
"GaoDe": {
|
||||||
|
"Key": "938a85a1cc3114b200522fb7ee579b27" //高德地图key
|
||||||
|
},
|
||||||
//代码生成配置
|
//代码生成配置
|
||||||
"CodeGen": {
|
"CodeGen": {
|
||||||
//uniapp 版本号2/3(vue版本号)
|
//uniapp 版本号2/3(vue版本号)
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ namespace ZR.Common;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GeoCodeService
|
public class GeoCodeService
|
||||||
{
|
{
|
||||||
private const string ApiKey = "675b1cc0e0d2e61fd475b668b9fd869d";
|
public static string ApiKey = "938a85a1cc3114b200522fb7ee579b27";
|
||||||
private const string BaseUrl = "https://restapi.amap.com/v3/geocode/regeo";
|
public const string BaseUrl = "https://restapi.amap.com/v3/geocode/regeo";
|
||||||
|
|
||||||
private readonly HttpClient _httpClient;
|
private readonly HttpClient _httpClient;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user