Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
b285548a
Commit
b285548a
authored
Jul 17, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:路由修改
parent
2a0d8acd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
79 deletions
+105
-79
router.ts
config/router.ts
+4
-27
commodityRoute.ts
config/routes/commodityRoute.ts
+26
-26
index.ts
config/routes/index.ts
+34
-7
logisticsRoutes.ts
config/routes/logisticsRoutes.ts
+7
-7
memberRoute.ts
config/routes/memberRoute.ts
+8
-8
shopRoute.ts
config/routes/shopRoute.ts
+4
-4
index.ts
config/shopRoutes/index.ts
+22
-0
No files found.
config/router.ts
View file @
b285548a
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'
,
...
...
config/routes/commodityRoute.ts
View file @
b285548a
...
...
@@ -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
,
...
...
config/routes/index.ts
View file @
b285548a
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
config/routes/logisticsRoutes.ts
View file @
b285548a
...
...
@@ -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'
// }
]
}
]
...
...
config/routes/memberRoute.ts
View file @
b285548a
...
...
@@ -7,49 +7,49 @@
*/
const
MemberRoute
=
{
path
:
'/memberAbility'
,
path
:
'/member
Center/member
Ability'
,
name
:
'memberAbility'
,
key
:
'memberAbility'
,
icon
:
'smile'
,
routes
:
[
{
path
:
'/memberAbility/manage'
,
path
:
'/member
Center/member
Ability/manage'
,
name
:
'memberManage'
,
key
:
'memberManage'
,
routes
:
[
{
path
:
'/memberAbility/manage/import'
,
path
:
'/member
Center/member
Ability/manage/import'
,
name
:
'memberImport'
,
key
:
'memberImport'
,
component
:
'@/pages/member/memberImport/index'
,
},
{
path
:
'/memberAbility/manage/addMember'
,
path
:
'/member
Center/member
Ability/manage/addMember'
,
name
:
'addMember'
,
key
:
'addMember'
,
hideInMenu
:
true
,
component
:
'@/pages/member/memberImport/addMember'
,
},
{
path
:
'/memberAbility/manage/maintian'
,
path
:
'/member
Center/member
Ability/manage/maintian'
,
name
:
'memberMaintain'
,
key
:
'memberMaintain'
,
component
:
'@/pages/member/memberMaintain/index'
,
},
{
path
:
'/memberAbility/manage/upgradeRule'
,
path
:
'/member
Center/member
Ability/manage/upgradeRule'
,
name
:
'memberUpgradeRule'
,
key
:
'memberUpgradeRule'
,
component
:
'@/pages/member/memberUpgradeRule/index'
,
},
{
path
:
'/memberAbility/manage/level'
,
path
:
'/member
Center/member
Ability/manage/level'
,
name
:
'memberLevel'
,
key
:
'memberLevel'
,
component
:
'@/pages/member/memberLevel/index'
},
{
path
:
'/memberAbility/manage/level/addEquity'
,
path
:
'/member
Center/member
Ability/manage/level/addEquity'
,
name
:
'addEquity'
,
key
:
'addEquity'
,
hideInMenu
:
true
,
...
...
config/routes/shopRoute.ts
View file @
b285548a
...
...
@@ -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
,
...
...
config/shopRoutes/index.ts
View file @
b285548a
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment