未央退出登录

This commit is contained in:
liuye
2024-07-23 15:48:15 +08:00
parent 325de69bf3
commit 8892201095

View File

@@ -201,12 +201,16 @@ export default {
content: "是否要退出登录", content: "是否要退出登录",
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.$instance.delete(`/auth/token/logout`).then(res=> {
if(res.code == 0) {
this.$store.commit('logout') this.$store.commit('logout')
this.$toast('退出成功'); this.$toast('退出成功');
setTimeout(() => { setTimeout(() => {
this.getAuth(); this.getAuth();
}, 500) }, 500)
} }
})
}
} }
}) })
}, },