fix: 注销登录后修正返回按钮跳转到登录页

#Comment
老页面停留在某个功能页面时,点击后退按钮时自动跳转到登录页面
This commit is contained in:
Argo Zhang 2019-10-27 20:54:47 +08:00
parent f781c5ffc2
commit 0a3c040f9a
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 8 additions and 0 deletions

View File

@ -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, '程序错误');

View File

@ -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, '程序错误');