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
6932d66a
Commit
6932d66a
authored
Dec 15, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 自营商城导航装修问题修复
parent
ac2bf23f
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
16 deletions
+51
-16
DesignPanel.tsx
src/pages/editor/components/DesignPanel.tsx
+4
-0
PreviewPanel.tsx
src/pages/editor/components/PreviewPanel.tsx
+4
-0
MallMainNav.ts
...s/editor/configs/componentConfigs/LingXiUI/MallMainNav.ts
+12
-0
index.ts
src/pages/editor/configs/componentConfigs/LingXiUI/index.ts
+2
-0
defaultData.ts
src/pages/editor/ownMallEdit/defaultData.ts
+2
-2
defaultMenu.ts
src/pages/editor/ownMallEdit/defaultMenu.ts
+23
-7
index.tsx
src/pages/editor/ownMallEdit/index.tsx
+2
-6
index.tsx
.../settingsPanel/propsSettings/components/MallNav/index.tsx
+2
-1
No files found.
src/pages/editor/components/DesignPanel.tsx
View file @
6932d66a
import
React
from
'react'
;
import
React
from
'react'
;
import
{
PageConfigType
}
from
'@linkseeks/design-core'
;
import
{
PageConfigType
}
from
'@linkseeks/design-core'
;
import
{
BrickDesign
}
from
'@linkseeks/design-react'
;
import
{
BrickDesign
}
from
'@linkseeks/design-react'
;
import
{
getLocale
}
from
'umi'
interface
DesignPanelPropsType
{
interface
DesignPanelPropsType
{
pageConfig
:
PageConfigType
,
pageConfig
:
PageConfigType
,
...
@@ -11,8 +12,11 @@ interface DesignPanelPropsType {
...
@@ -11,8 +12,11 @@ interface DesignPanelPropsType {
const
DesignPanel
:
React
.
FC
<
DesignPanelPropsType
>
=
(
props
)
=>
{
const
DesignPanel
:
React
.
FC
<
DesignPanelPropsType
>
=
(
props
)
=>
{
const
{
pageConfig
,
theme
,
pageName
=
'index'
,
onlyEidt
}
=
props
;
const
{
pageConfig
,
theme
,
pageName
=
'index'
,
onlyEidt
}
=
props
;
const
locale
=
getLocale
()
return
<
BrickDesign
return
<
BrickDesign
pageName=
{
pageName
}
pageName=
{
pageName
}
locale=
{
locale
}
initState=
{
{
pageConfig
}
}
initState=
{
{
pageConfig
}
}
themeName=
{
theme
}
themeName=
{
theme
}
onlyEidt=
{
onlyEidt
}
onlyEidt=
{
onlyEidt
}
...
...
src/pages/editor/components/PreviewPanel.tsx
View file @
6932d66a
import
React
from
'react'
;
import
React
from
'react'
;
import
{
PageConfigType
}
from
'@linkseeks/design-core'
;
import
{
PageConfigType
}
from
'@linkseeks/design-core'
;
import
{
BrickPreview
}
from
'@linkseeks/design-react'
;
import
{
BrickPreview
}
from
'@linkseeks/design-react'
;
import
{
getLocale
}
from
'umi'
interface
DesignPanelPropsType
{
interface
DesignPanelPropsType
{
pageConfig
:
PageConfigType
,
pageConfig
:
PageConfigType
,
...
@@ -11,8 +12,11 @@ interface DesignPanelPropsType {
...
@@ -11,8 +12,11 @@ interface DesignPanelPropsType {
const
DesignPanel
:
React
.
FC
<
DesignPanelPropsType
>
=
(
props
)
=>
{
const
DesignPanel
:
React
.
FC
<
DesignPanelPropsType
>
=
(
props
)
=>
{
const
{
pageConfig
,
theme
,
pageName
=
'index'
,
onlyEidt
}
=
props
;
const
{
pageConfig
,
theme
,
pageName
=
'index'
,
onlyEidt
}
=
props
;
const
locale
=
getLocale
()
return
<
BrickPreview
return
<
BrickPreview
pageName=
{
pageName
}
pageName=
{
pageName
}
locale=
{
locale
}
initState=
{
{
pageConfig
}
}
initState=
{
{
pageConfig
}
}
themeName=
{
theme
}
themeName=
{
theme
}
onlyEidt=
{
onlyEidt
}
onlyEidt=
{
onlyEidt
}
...
...
src/pages/editor/configs/componentConfigs/LingXiUI/MallMainNav.ts
0 → 100644
View file @
6932d66a
import
{
ComponentSchemaType
,
PROPS_SETTING_TYPES
}
from
'@linkseeks/design-core'
;
const
MallMainNav
:
ComponentSchemaType
=
{
propsConfig
:
{
componentType
:
{
label
:
'导航朗编辑'
,
type
:
PROPS_SETTING_TYPES
.
mallNav
},
},
};
export
default
MallMainNav
;
src/pages/editor/configs/componentConfigs/LingXiUI/index.ts
View file @
6932d66a
...
@@ -58,6 +58,7 @@ import OwnBanner from './OwnBanner'
...
@@ -58,6 +58,7 @@ import OwnBanner from './OwnBanner'
import
MallHeader
from
'./MallHeader'
import
MallHeader
from
'./MallHeader'
import
OwnMainNav
from
'./OwnMainNav'
import
OwnMainNav
from
'./OwnMainNav'
import
MobileBrand
from
'./MobileBrand'
import
MobileBrand
from
'./MobileBrand'
import
MallMainNav
from
'./MallMainNav'
export
default
{
export
default
{
View
,
View
,
...
@@ -83,6 +84,7 @@ export default {
...
@@ -83,6 +84,7 @@ export default {
CommonTitle
,
CommonTitle
,
ChannelHeader
,
ChannelHeader
,
ShopHeader
,
ShopHeader
,
MallMainNav
,
MobileBanner
,
MobileBanner
,
MobileChannelBanner
,
MobileChannelBanner
,
MobileQuickNav
,
MobileQuickNav
,
...
...
src/pages/editor/ownMallEdit/defaultData.ts
View file @
6932d66a
...
@@ -39,7 +39,7 @@ export const topAdvertConfig = {
...
@@ -39,7 +39,7 @@ export const topAdvertConfig = {
export
const
headerConfig
=
{
export
const
headerConfig
=
{
key
:
"3"
,
key
:
"3"
,
"3"
:
{
"3"
:
{
"componentName"
:
"
Mall
Header"
,
"componentName"
:
"Header"
,
"props"
:
{
"props"
:
{
"logoUrl"
:
""
,
"logoUrl"
:
""
,
type
:
'own'
type
:
'own'
...
@@ -50,7 +50,7 @@ export const headerConfig = {
...
@@ -50,7 +50,7 @@ export const headerConfig = {
export
const
mainNavConfig
=
{
export
const
mainNavConfig
=
{
key
:
"4"
,
key
:
"4"
,
"4"
:
{
"4"
:
{
"componentName"
:
"
Own
MainNav"
,
"componentName"
:
"
Mall
MainNav"
,
"props"
:
{
"props"
:
{
},
},
...
...
src/pages/editor/ownMallEdit/defaultMenu.ts
View file @
6932d66a
...
@@ -2,49 +2,65 @@ import { getIntl } from 'umi'
...
@@ -2,49 +2,65 @@ import { getIntl } from 'umi'
const
intl
=
getIntl
()
const
intl
=
getIntl
()
export
const
getDefaultMenuData
=
(
mallPath
:
string
,
memberId
:
number
)
=>
{
export
interface
NavItemType
{
link
:
string
,
name
:
string
,
status
:
boolean
,
type
:
number
,
}
const
getStatusByType
=
(
type
:
number
,
list
:
NavItemType
[]
|
undefined
)
=>
{
if
(
!
list
)
return
true
const
current
=
list
.
filter
((
item
)
=>
item
.
type
===
type
)[
0
]
if
(
current
)
{
return
current
.
status
}
return
true
}
export
const
getDefaultMenuData
=
(
mallPath
:
string
,
memberId
:
number
,
list
?:
any
[])
=>
{
return
[
return
[
{
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
`
,
"link"
:
`
${
mallPath
}
/
${
memberId
}
`
,
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.home'
}),
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.home'
}),
"key"
:
"Home"
,
"key"
:
"Home"
,
type
:
1
,
type
:
1
,
status
:
true
,
status
:
getStatusByType
(
1
,
list
)
,
},
},
{
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/commodity`
,
"link"
:
`
${
mallPath
}
/
${
memberId
}
/commodity`
,
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.commodity'
}),
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.commodity'
}),
"key"
:
"commodity"
,
"key"
:
"commodity"
,
type
:
2
,
type
:
2
,
status
:
true
,
status
:
getStatusByType
(
2
,
list
)
,
},
},
{
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/inquery`
,
"link"
:
`
${
mallPath
}
/
${
memberId
}
/inquery`
,
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.inquery'
}),
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.inquery'
}),
"key"
:
"inquery"
,
"key"
:
"inquery"
,
type
:
3
,
type
:
3
,
status
:
true
,
status
:
getStatusByType
(
3
,
list
)
,
},
},
{
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/points`
,
"link"
:
`
${
mallPath
}
/
${
memberId
}
/points`
,
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.integral'
}),
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.integral'
}),
"key"
:
"points"
,
"key"
:
"points"
,
type
:
4
,
type
:
4
,
status
:
true
,
status
:
getStatusByType
(
4
,
list
)
,
},
},
{
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/infomation`
,
"link"
:
`
${
mallPath
}
/
${
memberId
}
/infomation`
,
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.infomation'
}),
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.infomation'
}),
"key"
:
"infomation"
,
"key"
:
"infomation"
,
type
:
6
,
type
:
6
,
status
:
true
,
status
:
getStatusByType
(
6
,
list
)
,
},
},
{
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/about`
,
"link"
:
`
${
mallPath
}
/
${
memberId
}
/about`
,
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.about'
}),
"name"
:
intl
.
formatMessage
({
id
:
'editor.own.menu.about'
}),
"key"
:
"about"
,
"key"
:
"about"
,
type
:
5
,
type
:
5
,
status
:
true
,
status
:
getStatusByType
(
5
,
list
)
,
},
},
]
]
...
...
src/pages/editor/ownMallEdit/index.tsx
View file @
6932d66a
...
@@ -182,13 +182,9 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
...
@@ -182,13 +182,9 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
id
===
Number
(
shopId
))[
0
]
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
id
===
Number
(
shopId
))[
0
]
// 导航栏
// 导航栏
const
navData
=
await
getOwnMallNavData
();
const
navData
:
any
=
await
getOwnMallNavData
();
if
(
!
isEmpty
(
navData
))
{
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
navData
;
}
else
{
const
mallPath
=
`
${
REQUEST_HEADER
}${
webMallInfo
?.
url
}.
$
{
TOP_DOMAIN
}
`
const
mallPath
=
`
${
REQUEST_HEADER
}${
webMallInfo
?.
url
}.
$
{
TOP_DOMAIN
}
`
mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId);
mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData)
}
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop
mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree()
mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree()
...
...
src/pages/editor/settingsPanel/propsSettings/components/MallNav/index.tsx
View file @
6932d66a
...
@@ -66,7 +66,8 @@ const MallNav: React.FC<MallNavProps> = (props) => {
...
@@ -66,7 +66,8 @@ const MallNav: React.FC<MallNavProps> = (props) => {
return
{
return
{
name
:
item
.
name
,
name
:
item
.
name
,
link
:
item
.
link
,
link
:
item
.
link
,
status
:
item
.
status
status
:
item
.
status
,
type
:
item
.
type
};
};
})
})
};
};
...
...
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