mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 修改i18n错误提示
This commit is contained in:
+10
-6
@@ -105,13 +105,17 @@ export const reloadRoutePage = () => {
|
||||
* * 退出登录
|
||||
*/
|
||||
export const logout = async () => {
|
||||
const res:any = await logoutApi()
|
||||
if(res.code === ResultEnum.SUCCESS) {
|
||||
window['$message'].success((`${window['$t']('global.logout_success')}!`))
|
||||
try {
|
||||
const res:any = await logoutApi()
|
||||
if(res.code === ResultEnum.SUCCESS) {
|
||||
window['$message'].success(window['$t']('global.logout_success'))
|
||||
clearCookie(RequestHttpHeaderEnum.COOKIE)
|
||||
clearLocalStorage(StorageEnum.GO_SYSTEM_STORE)
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
}
|
||||
} catch (error) {
|
||||
window['$message'].success(window['$t']('global.logout_success'))
|
||||
}
|
||||
clearCookie(RequestHttpHeaderEnum.COOKIE)
|
||||
clearLocalStorage(StorageEnum.GO_SYSTEM_STORE)
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user