diff --git a/frontend/src/stores/user.ts b/frontend/src/stores/user.ts index 0e21fc17..8ad8824e 100644 --- a/frontend/src/stores/user.ts +++ b/frontend/src/stores/user.ts @@ -81,7 +81,10 @@ export const UserStore = defineStore('user', { }, async logout() { - const param = { ...{ token: this.token }, ...this.platformInfo } + let param = { token: this.token } + if (wsCache.get('user.platformInfo')) { + param = { ...param, ...wsCache.get('user.platformInfo') } + } const res: any = await AuthApi.logout(param) this.clear() if (res) { diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index eaf9e17c..c0cd05ff 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -1,5 +1,13 @@