MeiRiYiCheng_1_old/YBDevice.Web/App.razor

24 lines
854 B
Plaintext
Raw Normal View History

2025-07-16 17:14:38 +08:00
@using Microsoft.AspNetCore.Components.Routing
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(BasicLayout)">
<NotAuthorized>
@if (context == null || context.User.Identity ==null || !context.User.Identity.IsAuthenticated)
{
<RedirectToLogin></RedirectToLogin>
}
else
{
}
</NotAuthorized>
</AuthorizeRouteView>
@* <RouteView RouteData="@routeData" DefaultLayout="@typeof(BasicLayout)" />
*@ </Found>
<NotFound>
<LayoutView Layout="@typeof(BasicLayout)">
<Result Status="404" />
</LayoutView>
</NotFound>
</Router>
<AntContainer />