You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
2.6 KiB
109 lines
2.6 KiB
import Vue from 'vue' |
|
import Router from 'vue-router' |
|
Vue.use(Router) |
|
import Layout from '@/layout' |
|
import CustomerMarket from '../views/distribution/CustomerMarket'; |
|
// 不需要数据库维护的路由 |
|
export const constantRoutes = [{ |
|
path: '/', |
|
component: Layout, |
|
redirect: 'dashboard', |
|
children: [ |
|
{ |
|
path: '/dashboard', |
|
component: () => import('@/views/dashboard/index'), |
|
name: 'dashboard', |
|
meta: { title: '星云台', icon: 'iconkongzhitai', affix: true } |
|
} |
|
] |
|
}, |
|
// 暂时添加的路由 |
|
{ |
|
path: '/product', |
|
component: Layout, |
|
redirect: 'productList', |
|
meta: { title: '商品', icon: 'iconkongzhitai', affix: true }, |
|
children: [ |
|
{ |
|
path: '/productList', |
|
component: () => import('@/views/product/productList/index'), |
|
name: 'productList', |
|
meta: { title: '商品列表', icon: 'iconkongzhitai', affix: true } |
|
}, |
|
{ |
|
path: '/productAdd', |
|
component: () => import('@/views/product/productAdd/newIndex'), |
|
name: 'productAdd', |
|
meta: { title: '添加商品', icon: 'iconkongzhitai', affix: true } |
|
}, |
|
{ |
|
path: '/productClassify', |
|
component: () => import('@/views/product/productClassify/index'), |
|
name: 'productClassify', |
|
meta: { title: '商品分类', icon: 'iconkongzhitai', affix: true } |
|
}, |
|
{ |
|
path: '/productAttr', |
|
component: () => import('@/views/product/productAttr/index'), |
|
name: 'productAttr', |
|
meta: { title: '商品属性', icon: 'iconkongzhitai', affix: true } |
|
} |
|
] |
|
}, |
|
{ path: '/CustomerMarket', component: CustomerMarket }, |
|
{ |
|
path: '/profile', |
|
component: Layout, |
|
redirect: '/profile/index', |
|
hidden: true, |
|
children: [ |
|
{ |
|
path: 'index', |
|
component: () => import('@/views/profile/index'), |
|
name: 'Profile', |
|
meta: { title: '个人中心', icon: 'user', noCache: true } |
|
} |
|
] |
|
}, |
|
{ |
|
path: '/redirect', |
|
component: Layout, |
|
hidden: true, |
|
children: [ |
|
{ |
|
path: '/redirect/:path*', |
|
component: () => import('@/views/redirect/index') |
|
} |
|
] |
|
}, |
|
{ |
|
path: '/webView', |
|
component: () => import('@/views/redirect/webView'), |
|
hidden: true |
|
}, |
|
{ |
|
path: '/login', |
|
component: () => import('@/views/login/index'), |
|
hidden: true |
|
}, |
|
{ |
|
path: '/distribution', |
|
component: () => import('@/views/distribution/distribution'), |
|
hidden: true |
|
}, |
|
{ |
|
path: '/sargeScreen', |
|
component: () => import('@/views/sargeScreen/sargeScreen'), |
|
hidden: true |
|
}, |
|
{ |
|
path: '/404', |
|
component: () => import('@/views/error-page/404'), |
|
hidden: true |
|
} |
|
] |
|
|
|
export default new Router({ |
|
scrollBehavior: () => ({ y: 0 }), |
|
routes: constantRoutes |
|
})
|
|
|