26 lines
742 B
C#
26 lines
742 B
C#
|
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
|
||
|
|
namespace LingAdmin.ApiGateway.Controllers;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 菜单控制器 - 提供导航菜单
|
||
|
|
/// </summary>
|
||
|
|
[ApiController]
|
||
|
|
[Route("api/[controller]")]
|
||
|
|
public class MenusController : ControllerBase
|
||
|
|
{
|
||
|
|
[HttpGet]
|
||
|
|
public ActionResult<object> GetMenus()
|
||
|
|
{
|
||
|
|
var menus = new[]
|
||
|
|
{
|
||
|
|
new { name = "menu.dashboard", path = "/", icon = "LayoutDashboard" },
|
||
|
|
new { name = "menu.users", path = "/users", icon = "Users" },
|
||
|
|
new { name = "menu.requisitions", path = "/requisitions", icon = "FileText" },
|
||
|
|
new { name = "menu.settings", path = "/settings", icon = "Settings" }
|
||
|
|
};
|
||
|
|
|
||
|
|
return Ok(new { code = 200, data = menus });
|
||
|
|
}
|
||
|
|
}
|