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