Commit 479346fe authored by v_liuhuaizhi's avatar v_liuhuaizhi

增加宠主管理路由

parent d32feaff
......@@ -11,8 +11,8 @@ NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register', '/privacy-policy']
router.beforeEach((to, from, next) => {
console.log('HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH', to, from, next)
NProgress.start()
debugger;
if (getToken()) {
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/
......@@ -20,7 +20,6 @@ router.beforeEach((to, from, next) => {
next()
NProgress.done()
} else {
console.log('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', store.getters.roles);
if (store.getters.roles.length === 0) {
isRelogin.show = true
// 判断当前用户是否已拉取完user_info信息
......@@ -34,7 +33,7 @@ router.beforeEach((to, from, next) => {
}).catch(err => {
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/' })
next({ path: '/login' })
})
})
} else {
......
......@@ -89,6 +89,28 @@ export const constantRoutes = [
},
]
},
{
path:'/customer-management',
component: Layout,
hidden: true,
permissions: ['*:*:*'],
children: [
//设备
{
path: 'pet-owner-management',
props: true,
permissions: ['*:*:*'],
component: () => import('@/views/customer-management/pet-owner-management/pet-owner-management'),
name: 'PetOwnerManagement',
meta: {
title: '宠主管理',
icon: 'dashboard',
activeMenu: '/customer-management/pet-owner-management',
}
},
]
},
//行政详情路由
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment