mirror of
https://gitee.com/XiaoLFeng/JSL_OrganizeInternalOA_Web.git
synced 2025-02-04 11:32:36 +08:00
修复bug
This commit is contained in:
parent
18edad8c61
commit
0b6cfa9e77
|
@ -34,11 +34,15 @@ const username=ref("John Doe")
|
|||
const avatarUrl=ref("path_to_avatar")
|
||||
const dropdownVisible=ref(false)
|
||||
const token = window.localStorage.getItem("token")
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
message.config({
|
||||
background: true
|
||||
})
|
||||
|
@ -54,6 +58,12 @@ function logout() {
|
|||
// 处理退出登录的逻辑
|
||||
requests.logout(token).then((res)=>{
|
||||
console.log(res)
|
||||
if (res.data.code === 200) {
|
||||
router.push("/login")
|
||||
message.success("退出成功")
|
||||
}else {
|
||||
message.error(res.data.message)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user