mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 16:35:53 +08:00
IM
This commit is contained in:
26
im/src/permission.js
Normal file
26
im/src/permission.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import router from '@/router'
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import config from '@/config/config'
|
||||
|
||||
|
||||
NProgress.configure({
|
||||
showSpinner: false,
|
||||
})
|
||||
|
||||
const WEBSITE_NAME = config.WEBSITE_NAME
|
||||
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
document.title = to.meta.title
|
||||
? `${WEBSITE_NAME} | ${to.meta.title}`
|
||||
: WEBSITE_NAME
|
||||
|
||||
|
||||
NProgress.start()
|
||||
next()
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
NProgress.done()
|
||||
})
|
||||
Reference in New Issue
Block a user