import Vue from "vue";
import VueRouter from "vue-router";
import { postMsgUtil } from "@ct/iframe-connect-sdk";
import Index from "../views/index.vue";

Vue.use(VueRouter);

const routes = [{ path: "/allAlarm", component: Index }];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});
router.beforeEach((to, from, next) => {
  postMsgUtil.trigger(null, "middleLink", { url: "checkCross" });
  next();
});

export default router;
