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