remove cookie

This commit is contained in:
AceDataCloud committed 2023-01-25 16:38:56 +08:00
1 parent 3f2243f411
commit 1d523e49b9
1 file changed
+3 -1
+3 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { getCookie } from 'typescript-cookie';
import { getCookie, removeCookie } from 'typescript-cookie';
import { getAuthBaseUrl, getDataBaseUrl } from '@/utils';
interface IData {
@@ -24,6 +24,8 @@ export default defineComponent({
if (this.accessToken && this.refreshToken) {
await this.$store.dispatch('setAccessToken', this.accessToken);
await this.$store.dispatch('setRefreshToken', this.refreshToken);
removeCookie('ACCESS_TOKEN');
removeCookie('REFRESH_TOKEN');
if (this.redirect) {
this.$router.push(this.redirect);
}