Commit b285548a authored by GuanHua's avatar GuanHua

feat:路由修改

parent 2a0d8acd
import { default as routes } from './routes'
import memberCenterRoute from './routes'
import shopRoute from './shopRoutes'
/**
* @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes
......@@ -27,32 +28,8 @@ const router = [
},
]
},
{
path: '/',
component: '@/layouts/BasicLayout',
routes: [
{
path: '/',
redirect: '/home'
},
{
path: '/shopAbility',
redirect: '/shopAbility/infoManage'
},
{
// 首页
path: '/home',
name: 'home',
icon: 'smile',
key: 'home',
component: '@/pages/index',
},
...routes,
{
component: '@/pages/404',
},
],
},
memberCenterRoute,
shopRoute,
{
path: '/404',
component: '@/pages/404',
......
......@@ -8,55 +8,55 @@
const CommodityRoute = {
// 商品能力
path: '/commodityAbility',
path: '/memberCenter/commodityAbility',
name: 'commodityAbility',
key: 'commodityAbility',
routes: [
{
path: '/commodityAbility/classAndProperty',
path: '/memberCenter/commodityAbility/classAndProperty',
name: 'classAndProperty',
key: 'classAndProperty',
routes: [
{
path: '/commodityAbility/classAndProperty/class',
path: '/memberCenter/commodityAbility/classAndProperty/class',
name: 'class',
icon: 'smile',
component: '@/pages/classAndProperty/class',
},
{
path: '/commodityAbility/classAndProperty/attribute',
path: '/memberCenter/commodityAbility/classAndProperty/attribute',
name: 'attribute',
icon: 'smile',
component: '@/pages/classAndProperty/attribute',
},
{
path: '/commodityAbility/classAndProperty/attribute/addAttribute',
path: '/memberCenter/commodityAbility/classAndProperty/attribute/addAttribute',
name: 'addAttribute',
icon: 'smile',
component: '@/pages/classAndProperty/attribute/addAttribute',
hideInMenu: true,
},
{
path: '/commodityAbility/classAndProperty/propertyValue',
path: '/memberCenter/commodityAbility/classAndProperty/propertyValue',
name: 'propertyValue',
icon: 'smile',
component: '@/pages/classAndProperty/propertyValue',
},
{
path: '/commodityAbility/classAndProperty/propertyValue/addPropertyValue',
path: '/memberCenter/commodityAbility/classAndProperty/propertyValue/addPropertyValue',
name: 'addPropertyValue',
icon: 'smile',
component: '@/pages/classAndProperty/propertyValue/addPropertyValue',
hideInMenu: true,
},
{
path: '/commodityAbility/classAndProperty/categoryAttributes',
path: '/memberCenter/commodityAbility/classAndProperty/categoryAttributes',
name: 'categoryAttributes',
icon: 'smile',
component: '@/pages/classAndProperty/categoryAttributes',
},
{
path: '/commodityAbility/classAndProperty/categoryAttributes/viewAttributes',
path: '/memberCenter/commodityAbility/classAndProperty/categoryAttributes/viewAttributes',
name: 'viewAttributes',
hideInMenu: true,
icon: 'smile',
......@@ -65,84 +65,84 @@ const CommodityRoute = {
]
},
{
path: '/commodityAbility/trademark',
path: '/memberCenter/commodityAbility/trademark',
name: 'trademark',
icon: 'smile',
component: '@/pages/trademark',
},
{
path: '/commodityAbility/trademark/addBrand',
path: '/memberCenter/commodityAbility/trademark/addBrand',
name: 'addBrand',
icon: 'smile',
hideInMenu: true,
component: '@/pages/trademark/addBrand',
},
{
path: '/commodityAbility/trademark/viewBrand',
path: '/memberCenter/commodityAbility/trademark/viewBrand',
name: 'viewBrand',
hideInMenu: true,
icon: 'smile',
component: '@/pages/trademark/viewBrand',
},
{
path: '/commodityAbility/commodity',
path: '/memberCenter/commodityAbility/commodity',
name: 'commodity',
icon: 'smile',
routes: [
{
path: '/commodityAbility/commodity/goods',
path: '/memberCenter/commodityAbility/commodity/goods',
name: 'goods',
icon: 'smile',
component: '@/pages/commodity/goods',
},
{
path: '/commodityAbility/commodity/goods/addGoods',
path: '/memberCenter/commodityAbility/commodity/goods/addGoods',
name: 'addGoods',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/goods/addGoods',
},
{
path: '/commodityAbility/commodity/products',
path: '/memberCenter/commodityAbility/commodity/products',
name: 'products',
icon: 'smile',
component: '@/pages/commodity/products',
},
{
path: '/commodityAbility/commodity/products/addProducts',
path: '/memberCenter/commodityAbility/commodity/products/addProducts',
name: 'addProducts',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/addProducts',
},
{
path: '/commodityAbility/commodity/products/viewProducts',
path: '/memberCenter/commodityAbility/commodity/products/viewProducts',
name: 'viewProducts',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/viewProducts',
},
{
path: '/commodityAbility/commodity/products/fastModifyPrice',
path: '/memberCenter/commodityAbility/commodity/products/fastModifyPrice',
name: 'fastModifyPrice',
icon: 'smile',
component: '@/pages/commodity/products/fastModifyPrice',
},
{
path: '/commodityAbility/commodity/products/directChannel',
path: '/memberCenter/commodityAbility/commodity/products/directChannel',
name: 'directChannel',
icon: 'smile',
component: '@/pages/commodity/products/directChannel',
},
{
path: '/commodityAbility/commodity/products/addDirectChannel',
path: '/memberCenter/commodityAbility/commodity/products/addDirectChannel',
name: 'addDirectChannel',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/addDirectChannel',
},
{
path: '/commodityAbility/commodity/products/viewDirectChannel',
path: '/memberCenter/commodityAbility/commodity/products/viewDirectChannel',
name: 'viewDirectChannel',
hideInMenu: true,
icon: 'smile',
......@@ -152,27 +152,27 @@ const CommodityRoute = {
]
},
{
path: '/commodityAbility/repositories',
path: '/memberCenter/commodityAbility/repositories',
name: 'repositories',
icon: 'smile',
component: './repositories',
},
{
path: '/commodityAbility/repositories/addRepository',
path: '/memberCenter/commodityAbility/repositories/addRepository',
name: 'addRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/addRepository',
},
{
path: '/commodityAbility/repositories/adjustRepository',
path: '/memberCenter/commodityAbility/repositories/adjustRepository',
name: 'adjustRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/adjustRepository',
},
{
path: '/commodityAbility/repositories/viewRepository',
path: '/memberCenter/commodityAbility/repositories/viewRepository',
name: 'viewRepository',
icon: 'smile',
hideInMenu: true,
......
import CommodityRoute from './commodityRoute'
import MemberRoute from './memberRoute'
import ShopRoute from './shopRoute'
import LogisticsRoute from './logisticsRoutes'
import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由
import LogisticsRoute from './logisticsRoutes' // 物流能力路由
const routes = [CommodityRoute, MemberRoute, ShopRoute,LogisticsRoute]
const routes = [CommodityRoute, MemberRoute, ShopRoute, LogisticsRoute]
export default routes
\ No newline at end of file
const memberCenterRoute = {
path: '/memberCenter',
component: '@/layouts/BasicLayout',
routes: [
{
path: '/memberCenter',
redirect: '/memberCenter/home'
},
{
path: '/shopAbility',
redirect: '/shopAbility/infoManage'
},
{
// 首页
path: `/memberCenter/home`,
name: 'home',
icon: 'smile',
key: 'home',
component: '@/pages/index',
},
...routes,
{
component: '@/pages/404',
},
],
}
export default memberCenterRoute
\ No newline at end of file
......@@ -5,35 +5,35 @@
* @Last Modified time: 2020-07-10 16:15:28
*/
const LogisticsRoute = {
path: '/logisticsAbility',
path: '/memberCenter/logisticsAbility',
name: 'logisticsAbility',
key: 'logisticsAbility',
icon: 'smile',
routes: [
{
path: '/logisticsAbility/logistics',
path: '/memberCenter/logisticsAbility/logistics',
name: 'logistics',
key: 'logistics',
routes: [
{
path: '/logisticsAbility/logistics/list/company',
path: '/memberCenter/logisticsAbility/logistics/list/company',
name: 'company',
component: '@/pages/logistics/list/company'
},
{
path: '/logisticsAbility/logistics/list/addCompany',
path: '/memberCenter/logisticsAbility/logistics/list/addCompany',
name: 'addCompany',
component: '@/pages/logistics/list/addCompany',
hideInMenu: true
},
//送货地址
{
path: '/logisticsAbility/logistics/list/deliveryAddress',
path: '/memberCenter/logisticsAbility/logistics/list/deliveryAddress',
name: 'deliveryAddress',
component: '@/pages/logistics/list/deliveryAddress'
},
{
path: '/logisticsAbility/logistics/list/addressForm',
path: '/memberCenter/logisticsAbility/logistics/list/addressForm',
name: 'addressForm',
component: '@/pages/logistics/list/components/addressForm',
hideInMenu: true
......@@ -48,7 +48,7 @@ const LogisticsRoute = {
// name: 'template',
// component: '@/pages/logistics/list/template'
// }
]
}
]
......
......@@ -7,49 +7,49 @@
*/
const MemberRoute = {
path: '/memberAbility',
path: '/memberCenter/memberAbility',
name: 'memberAbility',
key: 'memberAbility',
icon: 'smile',
routes: [
{
path: '/memberAbility/manage',
path: '/memberCenter/memberAbility/manage',
name: 'memberManage',
key: 'memberManage',
routes: [
{
path: '/memberAbility/manage/import',
path: '/memberCenter/memberAbility/manage/import',
name: 'memberImport',
key: 'memberImport',
component: '@/pages/member/memberImport/index',
},
{
path: '/memberAbility/manage/addMember',
path: '/memberCenter/memberAbility/manage/addMember',
name: 'addMember',
key: 'addMember',
hideInMenu: true,
component: '@/pages/member/memberImport/addMember',
},
{
path: '/memberAbility/manage/maintian',
path: '/memberCenter/memberAbility/manage/maintian',
name: 'memberMaintain',
key: 'memberMaintain',
component: '@/pages/member/memberMaintain/index',
},
{
path: '/memberAbility/manage/upgradeRule',
path: '/memberCenter/memberAbility/manage/upgradeRule',
name: 'memberUpgradeRule',
key: 'memberUpgradeRule',
component: '@/pages/member/memberUpgradeRule/index',
},
{
path: '/memberAbility/manage/level',
path: '/memberCenter/memberAbility/manage/level',
name: 'memberLevel',
key: 'memberLevel',
component: '@/pages/member/memberLevel/index'
},
{
path: '/memberAbility/manage/level/addEquity',
path: '/memberCenter/memberAbility/manage/level/addEquity',
name: 'addEquity',
key: 'addEquity',
hideInMenu: true,
......
......@@ -7,25 +7,25 @@
*/
const ShopRoute = {
path: '/shopAbility',
path: '/memberCenter/shopAbility',
name: 'shopAbility',
key: 'shopAbility',
icon: 'smile',
routes: [
{
path: '/shopAbility/infoManage',
path: '/memberCenter/shopAbility/infoManage',
name: 'shopInfoManage',
key: 'shopInfoManage',
component: '@/pages/shop/shopInfo',
},
{
path: '/shopAbility/template',
path: '/memberCenter/shopAbility/template',
name: 'shopTemplate',
key: 'shopTemplate',
component: '@/pages/shop/shopTemplate',
},
{
path: '/shopAbility/template/detail',
path: '/memberCenter/shopAbility/template/detail',
name: 'shopTemplate',
key: 'shopTemplate',
hideInMenu: true,
......
const routes = []
const shopRoute = {
path: '/',
routes: [
{
// 首页
path: `/`,
name: 'home',
icon: 'smile',
key: 'home',
component: '@/pages/index',
},
...routes,
{
component: '@/pages/404',
},
],
}
export default shopRoute
\ No newline at end of file
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