This commit is contained in:
AceDataCloud committed 2023-12-18 02:51:45 +08:00
1 parent 0f3d7d36fc
commit 8832489390
1 file changed
+4 -4
+4 -4
View File
@@ -25,13 +25,13 @@ export default defineComponent({
this.refreshToken = getCookie('REFRESH_TOKEN');
if (this.accessToken && this.refreshToken) {
// store token to global store
this.$store.dispatch('setAccessToken', this.accessToken);
this.$store.dispatch('setRefreshToken', this.refreshToken);
await this.$store.dispatch('setToken', {
refresh: this.refreshToken,
access: this.accessToken
});
console.debug('set token successfully');
removeCookies();
console.debug('remove cookie for tokens successfully');
// get user info after get access token
this.$store.dispatch('getMe');
if (this.redirect) {
this.$router.push(this.redirect);
}