diff --git a/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js b/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js index 8819ad3c..4c422fbe 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js +++ b/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js @@ -206,6 +206,10 @@ success(result); }, error: function (XMLHttpRequest, textStatus, errorThrown) { + if (errorThrown === "Unauthorized") { + window.location.href = $.formatUrl('Account/Logout'); + return; + } if (window.toastr) { if (errorThrown === '') errorThrown = url; toastr.error(XMLHttpRequest.status === 500 ? '后台应用程序错误' : errorThrown, '程序错误'); diff --git a/src/client/Bootstrap.Client/wwwroot/lib/longbow/longbow.common.js b/src/client/Bootstrap.Client/wwwroot/lib/longbow/longbow.common.js index 8819ad3c..4c422fbe 100644 --- a/src/client/Bootstrap.Client/wwwroot/lib/longbow/longbow.common.js +++ b/src/client/Bootstrap.Client/wwwroot/lib/longbow/longbow.common.js @@ -206,6 +206,10 @@ success(result); }, error: function (XMLHttpRequest, textStatus, errorThrown) { + if (errorThrown === "Unauthorized") { + window.location.href = $.formatUrl('Account/Logout'); + return; + } if (window.toastr) { if (errorThrown === '') errorThrown = url; toastr.error(XMLHttpRequest.status === 500 ? '后台应用程序错误' : errorThrown, '程序错误');