zhou zhou
10 小时以前 46d872c1a5b77aa8799de4a64888a0a24a1422d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { createRouter, createWebHashHistory } from 'vue-router'
import { staticRoutes } from './routes/staticRoutes'
import { configureNProgress } from '@/utils/router'
import { setupBeforeEachGuard } from './guards/beforeEach'
import { setupAfterEachGuard } from './guards/afterEach'
const router = createRouter({
  history: createWebHashHistory(),
  routes: staticRoutes
  // 静态路由
})
function initRouter(app) {
  configureNProgress()
  setupBeforeEachGuard(router)
  setupAfterEachGuard(router)
  app.use(router)
}
const HOME_PAGE_PATH = ''
export { HOME_PAGE_PATH, initRouter, router }