|
@@ -0,0 +1,73 @@
|
|
|
+import Layout from '@/layout'
|
|
|
+
|
|
|
+const productRouter = {
|
|
|
+ path: '/product',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/product/product',
|
|
|
+ alwaysShow: true, // will always show the root menu
|
|
|
+ name: 'ProductSetting', // name必须和后台配置一致,不然匹配不到
|
|
|
+ meta: { title: '商品设置', icon: 'component' },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'product',
|
|
|
+ component: () => import('@/views/product/index'),
|
|
|
+ redirect: '/product/product/list',
|
|
|
+ name: 'ProductManage',
|
|
|
+ meta: { title: '商品管理', icon: 'documentation' },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'list',
|
|
|
+ hidden: true,
|
|
|
+ component: () => import('@/views/product/product/list.vue'),
|
|
|
+ name: 'ProductList',
|
|
|
+ meta: { title: '商品列表' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'edit',
|
|
|
+ hidden: true,
|
|
|
+ component: () => import('@/views/product/product/form.vue'),
|
|
|
+ name: 'ProductEdit',
|
|
|
+ meta: { title: '编辑商品', noCache: true }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'add',
|
|
|
+ hidden: true,
|
|
|
+ component: () => import('@/views/product/product/form.vue'),
|
|
|
+ name: 'ProductEdit',
|
|
|
+ meta: { title: '添加商品', noCache: true }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'classify',
|
|
|
+ component: () => import('@/views/product/index'),
|
|
|
+ redirect: '/product/classify/list',
|
|
|
+ name: 'ClassifyManage',
|
|
|
+ meta: { title: '分类管理', icon: 'documentation' },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'list',
|
|
|
+ hidden: true,
|
|
|
+ component: () => import('@/views/product/classify/list.vue'),
|
|
|
+ name: 'ClassifyList',
|
|
|
+ meta: { title: '分类列表' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'edit',
|
|
|
+ hidden: true,
|
|
|
+ component: () => import('@/views/product/classify/form.vue'),
|
|
|
+ name: 'ClassifyEdit',
|
|
|
+ meta: { title: '编辑分类', noCache: true }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'add',
|
|
|
+ hidden: true,
|
|
|
+ component: () => import('@/views/product/classify/form.vue'),
|
|
|
+ name: 'ClassifyEdit',
|
|
|
+ meta: { title: '添加分类', noCache: true }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|
|
|
+export default productRouter
|