//路由守卫.ts
// import router from "../src/router";
// import { useUserStore } from "./store/modules/user";
// router.beforeEach((to: any, from: any, next: any) => {
//   const store = useUserStore();
//   const whiteList = ["/login", "/register"];
//   if (store.userInfo.token) {
//     next();
//   } else {
//     if (whiteList.includes(to.path)) {
//       //白名单登录
//       next();
//     } else {
//       next("/login");
//     }
//   }
// });
