Commit 1ccd3043 by zhoujinhui

api跨域

parent 797fa862
......@@ -28,6 +28,6 @@ namespace Bailun.DC.Models.Common
/// <summary>
/// HTTP状态码
/// </summary>
public int Code { get; set; }
public int Code => IsSuccess ? 200 : 0;
}
}
......@@ -54,5 +54,9 @@ and s2.company_type = @CorporateEntity";
return obj;
};
}
#region 付现流水明细
#endregion
}
}
......@@ -42,5 +42,10 @@ namespace Bailun.DC.WebApi.Controllers
[HttpPost("getCashFlowStatement")]
public async Task<CommonApiResponseDto<List<dc_base_finance_fee>>> GetCashFlowStatement(GetCashFlowStatementInput input)
=> await new FinanceService().GetCashFlowStatement(input);
#region 付现流水明细
#endregion
}
}
......@@ -34,6 +34,7 @@ namespace Bailun.DC.WebApi
{
ConfigManagerConf.SetConfiguration(Configuration);
ConfigHelper.SetAppSetting(Configuration);
services.AddCors(options =>options.AddPolicy("cors",p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod().AllowCredentials()));
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "Bailun.DC.WebApi", Version = "v1" });
......@@ -72,6 +73,7 @@ namespace Bailun.DC.WebApi
{
app.UseDeveloperExceptionPage();
}
app.UseCors("cors");
app.UseSwagger();
app.UseSwaggerUI(c =>
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment