fix: 返回前台防止多次跳转
This commit is contained in:
parent
4035c96c83
commit
82cc6befaa
|
@ -65,11 +65,11 @@ public class Index : ComponentBase
|
|||
|
||||
private void Redirect()
|
||||
{
|
||||
var url = Navigation.ToBaseRelativePath(Navigation.Uri).TrimEnd('/');
|
||||
var routes = GetType().GetCustomAttributes<RouteAttribute>();
|
||||
if (!routes.Any(i => i.Template.Equals(url, StringComparison.OrdinalIgnoreCase)))
|
||||
if (routes.Any(i => $"{Navigation.BaseUri}{i.Template}".TrimEnd('/').Equals(Url, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
Url = "Admin/Index";
|
||||
}
|
||||
Navigation.NavigateTo(Url, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public static class LoginHelper
|
|||
var appUrl = dictService.GetHomeUrlByAppId(appId);
|
||||
if (!string.IsNullOrEmpty(appUrl))
|
||||
{
|
||||
returnUrl = string.Format(appUrl, schema, host);
|
||||
returnUrl = string.Format(appUrl, schema, host).TrimEnd('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue