11
This commit is contained in:
@@ -12,7 +12,8 @@ namespace Application.Web.Controllers.Pub
|
||||
{
|
||||
private readonly IAreaService _areaService;
|
||||
private readonly INoticeService _noticeService;
|
||||
public PubController(IAreaService areaService,INoticeService noticeService)
|
||||
|
||||
public PubController(IAreaService areaService, INoticeService noticeService)
|
||||
{
|
||||
_areaService = areaService;
|
||||
_noticeService = noticeService;
|
||||
@@ -24,7 +25,7 @@ namespace Application.Web.Controllers.Pub
|
||||
/// <param name="sid"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<IPoAction> GetMain(string sid)
|
||||
public async Task<IPoAction> GetMain(string? sid)
|
||||
{
|
||||
bool isOnline = false;
|
||||
if (!string.IsNullOrEmpty(sid))
|
||||
@@ -34,8 +35,9 @@ namespace Application.Web.Controllers.Pub
|
||||
|
||||
var areaData = await _areaService.GetAreaData();
|
||||
var notice = await _noticeService.GetNoticeDataByTake(5);
|
||||
int OnCount = 100;
|
||||
return PoAction.Ok(new { area = areaData ,notice,isOnline,onCount=OnCount});
|
||||
|
||||
int OnCount = 100;
|
||||
return PoAction.Ok(new { area = areaData, notice, isOnline, onCount = OnCount });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user