lixuliang
2024-08-29 7cde297f0a99e060aea9bce60d1c121a14ae74d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import login from '@/components/login'
import URLconfig from "../../static/URLconfig";
 
Vue.use(Router)
const routes = [
  {
    path: '/',
    redirect: "login",
  },
  {
    path: '/login',
    name: 'login',
    component: login,
  },
  {
    path: '/index',
    name: 'index',
    component: index
  },
];
const router = new Router({
  mode: "history",
  base: URLconfig.routerBase,
  routes,
});
router.beforeEach((to, from, next) => {
  next();
})
export default router;