1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-10-19 13:56:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

添加账号注销功能

This commit is contained in:
2022-04-05 17:23:06 +08:00
parent 364566d6c1
commit 8598edc0f7
7 changed files with 186 additions and 2 deletions

View File

@@ -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}) `);
}
});