From bfef5f89d11f88898ffc527529d17795b00a4ef8 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Thu, 21 Dec 2023 22:27:28 +0800 Subject: [PATCH] yh --- public/account.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/public/account.html b/public/account.html index b64e8f1..ec96b48 100644 --- a/public/account.html +++ b/public/account.html @@ -87,7 +87,10 @@ console.log(response); let result = response.data if (result.code != 1000) { - return this.$message.error(response.data.message); + this.$message.error(response.data.message); + window.sessionStorage.removeItem('token'); + window.location.href = '/login.html'; + return; } this.username = result.data.username; this.userInfo = result.data.userInfo; @@ -173,7 +176,12 @@ if (result.code != 1000) { return this.$message.error(response.data.message); } - window.location.href = window.location.href; + if (result.data.result) { + this.$message.success('解绑成功'); + window.location.href = window.location.href; + } else { + return this.$message.error('解绑失败'); + } }) .catch((error) => { this.$message.error('请求错误');