保誠-保戶業務員媒合平台
Tomas
2022-01-12 03ea05b93dcb5adc546d9d37204df5142e2058dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { Middleware } from '@nuxt/types';
 
const errorRouteMiddleware: Middleware = (context) => {
  if (!context.route.name) {
    const isAdminLogin = context.store.getters['localStorage/isAdminLogin'];
    if (isAdminLogin) {
      context.redirect('/myAppointmentList/appointmentList');
      return;
    }
    context.redirect('/')
  }
}
 
export default errorRouteMiddleware