const Layout = () => import("@/layout/index.vue");
import { useUserStore } from "@/store/modules/user";
export default {
  path: "/message",
  name: "message",
  component: Layout,
  redirect: "/message/main",
  children: [
    {
      path: "main",
      component: () => import("@/views/message/index.vue"),
      name: "MessageMain",
      meta: {
        title: "消息",
        icon: "homepage",
      },
    },
  ],
  beforeEnter: (to, from, next) => {
    const store = useUserStore();
    if (store.user.stationType == "16") {
      next();
    } else {
      next({ path: "/" });
    }
  },
};
