using Microsoft.AspNetCore.Mvc;
using QYZH.InteractiveMagazine.IService;
using QYZH.InteractiveMagazine.Models.Dto;
using QYZH.InteractiveMagazine.Models.Dto.Banner;
using QYZH.InteractiveMagazine.Models.Enum;
namespace QYZH.InteractiveMagazine.WeChatApi.Controllers;
///
/// 小程序轮播图控制器
///
public class BannerController(IBannerService bannerService) : WeChatBaseController
{
///
/// 获取启用轮播图列表
///
/// 展示位置
/// 轮播图列表
[HttpGet]
public async Task>> GetListAsync([FromQuery] BannerPositionEnum position = BannerPositionEnum.Home)
{
var result = await bannerService.GetEnabledListAsync(position);
return Success(result);
}
}