【发布时间】:2021-04-17 13:24:49
【问题描述】:
这是我的代码:
export default function ({ store, redirect }) {
// If the user is not authenticated
if (!store.state.auth.auth) {
return redirect('/login')
}
}
但我的主要问题是刷新页面后我的商店是空的,因为我想在中间件中使用我的 cookie。
【问题讨论】:
标签: nuxt.js middleware js-cookie