authenticated.js 323 B

12345678910
  1. export default function ({ isServer, store, req, redirect }) {
  2. if (isServer && !req) return
  3. console.log(store.state.option.isLogin.data)
  4. // if (!store.state.option.isLogin.logged) {
  5. if (!store.state.option.isLogin.data.content || !store.state.option.isLogin.data.content.isLogin) {
  6. return redirect('/')
  7. }
  8. }