1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-21 01:10:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

第三方账号取消授权功能完成

This commit is contained in:
2022-04-04 23:23:41 +08:00
parent 7cca39d2de
commit 3986458622
7 changed files with 94 additions and 1 deletions

View File

@@ -21,6 +21,28 @@
</main>
<%- include("../component/footer-user.html"); %>
<script>
function thirdPartyWithdraw(platform) {
postRequest("/third-party/withdrawThirdPartyBings", { token: localStorage.token, platform: platform })
.then(function (response) {
var axiosData = response.data;
var status = axiosData.status;
var data = axiosData.data;
if (status === "success") {
console.log(data);
if(data == "success") {
alert("取消绑定成功!");
location.reload();
} else {
alert("出错啦,刷新页面重新试试吧");
}
} else {
alert(`出错啦!${data.errMsg} (错误码: ${data.errCode}) `);
location.reload();
}
}).catch(function (error) {
console.log(error);
});
}
if(localStorage.token != null) {
getRequest("/third-party/getBindingStatus", { token: localStorage.token })
.then(function (response) {