111
This commit is contained in:
31
Service/Application.Web/Controllers/Pub/PubController.cs
Normal file
31
Service/Application.Web/Controllers/Pub/PubController.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Application.Web.Controllers.Pub
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 公共接口
|
||||
/// </summary>
|
||||
[Route("[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class PubController : ControllerBase
|
||||
{
|
||||
private readonly IAreaService _areaService;
|
||||
public PubController(IAreaService areaService)
|
||||
{
|
||||
_areaService = areaService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取首页信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<IPoAction> GetMain()
|
||||
{
|
||||
var areaData = await _areaService.GetAreaData();
|
||||
return PoAction.Ok(new{area=areaData});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user