修复首页‘注销失败’ bug

This commit is contained in:
RockYang
2025-05-11 08:31:55 +08:00
parent 628ae15fd7
commit a9505ff72d

View File

@@ -205,6 +205,7 @@ const rainbowColor = (index) => {
return `hsl(${hue}, 90%, 50%)` // 色调(hue),饱和度(70%),亮度(50%) return `hsl(${hue}, 90%, 50%)` // 色调(hue),饱和度(70%),亮度(50%)
} }
const logout = function () {
httpGet('/api/user/logout') httpGet('/api/user/logout')
.then(() => { .then(() => {
removeUserToken() removeUserToken()
@@ -213,6 +214,7 @@ httpGet('/api/user/logout')
.catch(() => { .catch(() => {
ElMessage.error('注销失败!') ElMessage.error('注销失败!')
}) })
}
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>