mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-10-19 13:56:43 +08:00
添加账号注销功能
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
<script>
|
||||
function getUserStatus() {
|
||||
if(!localStorage) {
|
||||
alert("浏览器不支持 localStorage ,请更换浏览器");
|
||||
window.location.href = "/";
|
||||
}
|
||||
|
||||
@@ -55,6 +56,11 @@
|
||||
window.location.href = "/login";
|
||||
}
|
||||
} else {
|
||||
if(data.errCode == "20004") { // 登陆过期
|
||||
localStorage.clear("token");
|
||||
localStorage.clear("is_admin");
|
||||
window.location.href = "/login";
|
||||
}
|
||||
alert(`出错啦!${data.errMsg} (错误码: ${data.errCode}) `);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user