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
shenshaokai
jinfa-platform
Commits
135fb0b0
Commit
135fb0b0
authored
Oct 18, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 自营商城装修
parent
2e7ef061
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
7 deletions
+58
-7
defaultMenu.ts
src/pages/editor/ownMallEdit/defaultMenu.ts
+49
-1
index.tsx
src/pages/editor/ownMallEdit/index.tsx
+9
-6
No files found.
src/pages/editor/ownMallEdit/defaultMenu.ts
View file @
135fb0b0
export
const
getDefaultMenuData
=
(
mallPath
:
string
,
memberId
:
number
)
=>
{
return
[
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
`
,
"name"
:
"商城首页"
,
"key"
:
"Home"
,
type
:
1
,
status
:
true
,
},
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/commodity`
,
"name"
:
"现货商品"
,
"key"
:
"commodity"
,
type
:
2
,
status
:
true
,
},
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/inquery`
,
"name"
:
"询价商品"
,
"key"
:
"inquery"
,
type
:
3
,
status
:
true
,
},
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/points`
,
"name"
:
"积分兑换"
,
"key"
:
"points"
,
type
:
4
,
status
:
true
,
},
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/infomation`
,
"name"
:
"行情资讯"
,
"key"
:
"infomation"
,
type
:
6
,
status
:
true
,
},
{
"link"
:
`
${
mallPath
}
/
${
memberId
}
/about`
,
"name"
:
"关于我们"
,
"key"
:
"about"
,
type
:
5
,
status
:
true
,
},
]
}
export
const
menuData
=
[
{
"link"
:
"/"
,
"name"
:
"首页"
,
"name"
:
"
商城
首页"
,
"key"
:
"Home"
,
type
:
1
,
status
:
true
,
...
...
src/pages/editor/ownMallEdit/index.tsx
View file @
135fb0b0
...
...
@@ -6,7 +6,7 @@ import DesignPanel from '../components/DesignPanel'
import
SettingPanel
from
'../settingsPanel'
import
config
from
'../configs'
import
{
isEmpty
}
from
'lodash'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
LAYOUT_TYPE
,
REQUEST_HEADER
,
TOP_DOMAIN
}
from
'@/constants'
import
{
topBarConfig
,
topAdvertConfig
,
...
...
@@ -22,7 +22,7 @@ import {
InformationConfig
,
FooterConfig
,
}
from
'./defaultData'
import
{
menuData
}
from
'./defaultMenu'
import
{
menuData
,
getDefaultMenuData
}
from
'./defaultMenu'
import
Loading
from
'../components/Loading'
import
{
PublicApi
}
from
'@/services/api'
import
{
GlobalConfig
}
from
'@/global/config'
...
...
@@ -173,12 +173,17 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
};
const
getComponentsConfig
=
async
()
=>
{
//商城信息
const
shopList
=
GlobalConfig
.
web
.
shopInfo
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
id
===
Number
(
shopId
))[
0
]
// 导航栏
const
navData
=
await
getOwnMallNavData
();
if
(
!
isEmpty
(
navData
))
{
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
navData
;
}
else
{
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
menuData
;
const
mallPath
=
`
${
REQUEST_HEADER
}${
webMallInfo
.
url
}
.
${
TOP_DOMAIN
}
`
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
getDefaultMenuData
(
mallPath
,
memberId
);
}
mainNavConfig
[
mainNavConfig
.
key
].
props
.
type
=
LAYOUT_TYPE
.
shop
mainNavConfig
[
mainNavConfig
.
key
].
props
.
categoryList
=
[]
...
...
@@ -191,9 +196,7 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
threeBannerConfig
[
threeBannerConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
3
)
// 四号位广告
fourBannerConfig
[
fourBannerConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
4
)
//商城信息
const
shopList
=
GlobalConfig
.
web
.
shopInfo
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
id
===
Number
(
shopId
))[
0
]
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
webMallInfo
.
name
headerConfig
[
headerConfig
.
key
].
props
.
logoUrl
=
webMallInfo
.
logoUrl
...
...
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