import { useUserStore } from "@/store/modules/user";
const Layout = () => import("@/layout/index.vue");
export default {
  path: "/prepare",
  name: "prepare",
  component: Layout,
  redirect: "/prepare/main",
  children: [
    {
      path: "main",
      component: () => import("@/views/prepare-complete-suit/index.vue"),
      name: "PrepareMain",
      meta: {
        title: "预齐套",
        icon: "homepage",
      },
    },
  ],
  beforeEnter: (to, from, next) => {
    const store = useUserStore();
    console.log(store.user.stationType);
    if (store.user.stationType == "5") {
      next();
    } else {
      next({ path: "/" });
    }
  },
};
