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
089186ea
Commit
089186ea
authored
Jul 18, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Plain Diff
新增物流单模块
parents
e0fcf98d
3420e3bb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
39 deletions
+63
-39
router.ts
config/router.ts
+22
-22
commodityRoute.ts
config/routes/commodityRoute.ts
+9
-1
index.ts
config/routes/index.ts
+1
-1
package.json
package.json
+1
-0
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+2
-3
OuterSide.tsx
src/layouts/components/OuterSide.tsx
+1
-1
SelectLang.tsx
src/layouts/components/SelectLang.tsx
+1
-1
MenuSlider.less
src/layouts/styles/MenuSlider.less
+23
-9
index.tsx
src/pages/index.tsx
+3
-1
No files found.
config/router.ts
View file @
089186ea
...
...
@@ -7,31 +7,31 @@ import shopRoute from './shopRoutes'
*/
const
router
=
[
{
path
:
'/user'
,
component
:
'@/layouts/UserLayouts'
,
routes
:
[
{
path
:
'/user/login'
,
component
:
'@/pages/user'
},
{
path
:
'/user/register'
,
component
:
'@/pages/user/register'
},
{
path
:
'/user/getBack'
,
component
:
'@/pages/user/getBack'
},
{
path
:
'/user/policy'
,
component
:
'@/pages/user/policy'
},
]
},
{
path
:
'/'
,
component
:
'@/wrappers/getSiteConfig'
,
routes
:
[
{
path
:
'/user'
,
component
:
'@/layouts/UserLayouts'
,
routes
:
[
{
path
:
'/user/login'
,
component
:
'@/pages/user'
},
{
path
:
'/user/register'
,
component
:
'@/pages/user/register'
},
{
path
:
'/user/getBack'
,
component
:
'@/pages/user/getBack'
},
{
path
:
'/user/policy'
,
component
:
'@/pages/user/policy'
},
]
},
memberCenterRoute
,
shopRoute
,
{
...
...
config/routes/commodityRoute.ts
View file @
089186ea
...
...
@@ -3,7 +3,7 @@
* @Author: ghua
* @Date: 2020-07-10 11:36:32
* @Last Modified by: ghua
* @Last Modified time: 2020-07-1
0 15:37:39
* @Last Modified time: 2020-07-1
8 11:19:36
*/
const
CommodityRoute
=
{
...
...
@@ -67,12 +67,14 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/trademark'
,
name
:
'trademark'
,
key
:
'trademark'
,
icon
:
'smile'
,
component
:
'@/pages/trademark'
,
},
{
path
:
'/memberCenter/commodityAbility/trademark/addBrand'
,
name
:
'addBrand'
,
key
:
'addBrand'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'@/pages/trademark/addBrand'
,
...
...
@@ -80,6 +82,7 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/trademark/viewBrand'
,
name
:
'viewBrand'
,
key
:
'viewBrand'
,
hideInMenu
:
true
,
icon
:
'smile'
,
component
:
'@/pages/trademark/viewBrand'
,
...
...
@@ -87,6 +90,7 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/commodity'
,
name
:
'commodity'
,
key
:
'commodity'
,
icon
:
'smile'
,
routes
:
[
{
...
...
@@ -154,12 +158,14 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/repositories'
,
name
:
'repositories'
,
key
:
'repositories'
,
icon
:
'smile'
,
component
:
'./repositories'
,
},
{
path
:
'/memberCenter/commodityAbility/repositories/addRepository'
,
name
:
'addRepository'
,
key
:
'addRepository'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'./repositories/addRepository'
,
...
...
@@ -167,6 +173,7 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/repositories/adjustRepository'
,
name
:
'adjustRepository'
,
key
:
'adjustRepository'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'./repositories/adjustRepository'
,
...
...
@@ -174,6 +181,7 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/repositories/viewRepository'
,
name
:
'viewRepository'
,
key
:
'viewRepository'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'./repositories/viewRepository'
,
...
...
config/routes/index.ts
View file @
089186ea
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-18 1
1:44:02
* @LastEditTime: 2020-07-18 1
8:56:08
*/
import
CommodityRoute
from
'./commodityRoute'
// 商品能力路由
import
MemberRoute
from
'./memberRoute'
// 会员能力路由
...
...
package.json
View file @
089186ea
...
...
@@ -3,6 +3,7 @@
"scripts"
:
{
"scripts:build"
:
"node scripts/run"
,
"start:analyze"
:
"ANALYZE=1 umi dev"
,
"clean"
:
"rimraf node_modules"
,
"start"
:
"umi dev"
,
"build"
:
"umi build"
,
"build:analyze"
:
"ANALYZE=1 umi build"
,
...
...
src/layouts/BasicLayout.tsx
View file @
089186ea
...
...
@@ -70,10 +70,10 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const
{
formatMessage
}
=
useIntl
();
const
basicInfo
=
getMenuData
(
props
.
route
.
routes
,
{
locale
:
true
},
formatMessage
)
const
menuData
=
basicInfo
.
menuData
const
menuData
=
basicInfo
.
menuData
?
basicInfo
.
menuData
.
filter
(
item
=>
!
item
.
redirect
)
:
[]
const
menuRouter
=
getMenuRouter
(
menuData
,
location
.
pathname
)
console
.
log
(
menuData
)
useEffect
(()
=>
{
if
(
menuRouter
&&
menuRouter
.
children
)
{
...
...
@@ -82,7 +82,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
}
else
{
setOpenKeys
(
initOpendKeys
(
menuRouter
.
children
))
}
}
else
{
setOpenKeys
([])
}
...
...
src/layouts/components/OuterSide.tsx
View file @
089186ea
...
...
@@ -41,7 +41,7 @@ const OuterSider: React.FC<OuterSiderProps> = (props) => {
<
li
key=
{
item
.
key
}
className=
{
defaultSelectedKeys
===
item
.
key
?
"currentItem"
:
''
}
>
<
Link
to=
{
item
.
path
}
>
<
AppstoreOutlined
/>
<
span
>
{
item
.
title
}
</
span
>
<
label
>
{
item
.
title
}
</
label
>
</
Link
>
</
li
>
))
...
...
src/layouts/components/SelectLang.tsx
View file @
089186ea
...
...
@@ -19,7 +19,7 @@ const SelectLang: React.FC = () => {
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'zh-CN'
)
useEffect
(()
=>
{
console
.
log
(
getLocale
(),
"
getLocale()
"
)
console
.
log
(
getLocale
(),
"
locale
"
)
setCurrentLangKey
(
getLocale
())
},
[])
...
...
src/layouts/styles/MenuSlider.less
View file @
089186ea
...
...
@@ -30,23 +30,33 @@
.menuBox {
padding: 0;
text-align: center;
padding-top: 24px;
li {
height: 60px;
line-height: 60px;
margin: 28px 0;
padding: 11px 0 2px 0;
margin-bottom: 16px;
span {
a {
display: block;
}
label {
display: block;
height: 24px;
line-height: 20px;
margin-top: 4px;
font-size: 12px;
font-weight: 400;
color: rgba(151, 160, 175, 1);
line-height: 24px;
}
span {
display: block;
// height: 24px;
font-size: 24px;
font-weight: 400;
color: rgba(151, 160, 175, 1);
& :first-child {
font-size: 24px;
}
}
}
}
...
...
@@ -56,6 +66,10 @@
span {
color: #fff !important;
}
label {
color: #fff !important;
}
}
.menuItem {
...
...
src/pages/index.tsx
View file @
089186ea
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Link
}
from
'umi'
class
Index
extends
Component
<
{},
{}
>
{
render
()
{
return
<
div
>
index
<
Link
to=
"/memberCenter/home"
>
会员中心
</
Link
>
</
div
>
}
}
...
...
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