保誠-保戶業務員媒合平台
jack
2023-09-05 3ecee0fa557b7bb9e83b67e289b316f04efa9ce5
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;