[fix]退出之后清除Cookie

This commit is contained in:
OrangeM21
2020-06-09 17:38:12 +08:00
parent 220b54788a
commit 50268991f9

View File

@@ -91,12 +91,20 @@ export default {
}
break
case 'logout':
this.logout()
window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}`
break
case 'apiKey':
this.$refs.api.showApi()
break
}
},
logout() {
// Clean Status
const statusList = ['currentOrg', 'currentRole', 'jms_current_org', 'jms_current_role', 'sidebarStatus', 'django_language', 'X-JMS-ORG', 'activeTab']
for (const i in statusList) {
this.$cookie.delete(statusList[i])
}
}
}
}