前端跟随增加cookie管理方法,防止后端无法设置cookie的情况下导致的某些功能不可用问题。
This commit is contained in:
@@ -141,6 +141,7 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
|
|
||||||
watch(() => token.value, () => {
|
watch(() => token.value, () => {
|
||||||
window.localStorage.setItem('token', token.value)
|
window.localStorage.setItem('token', token.value)
|
||||||
|
cookie.set('x-token', token.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user