Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
a5b666f8
Commit
a5b666f8
authored
Jun 21, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台首页导航装修修改
parent
0ee02286
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
10 deletions
+34
-10
index.ts
src/constants/index.ts
+4
-0
index.tsx
src/pages/pageCustomized/platformEdit/index.tsx
+5
-3
utils.ts
src/pages/pageCustomized/platformEdit/utils.ts
+9
-0
index.tsx
.../settingsPanel/propsSettings/components/MallNav/index.tsx
+16
-7
No files found.
src/constants/index.ts
View file @
a5b666f8
...
...
@@ -105,6 +105,10 @@ export enum LAYOUT_TYPE {
* 渠道商城-积分兑换
*/
channelScoreMall
=
'channelScoreMall'
,
/**
* 平台首页
*/
platform
=
'platform'
}
// 本地环境跳过权限校验
...
...
src/pages/pageCustomized/platformEdit/index.tsx
View file @
a5b666f8
...
...
@@ -3,7 +3,7 @@ import { LegoProvider, PROPS_TYPES } from 'lingxi-editor-core'
import
DesignPanel
from
'../components/DesignPanel'
import
SettingPanel
from
'../settingsPanel'
import
config
from
'../configs'
import
{
Button
,
Modal
,
message
}
from
'antd'
import
{
Modal
,
message
}
from
'antd'
import
{
Prompt
,
history
}
from
'umi'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
...
...
@@ -12,7 +12,7 @@ import {
FooterConfig
}
from
'./defaultData'
import
Loading
from
'../components/Loading'
import
{
ArrowLeftOutlined
}
from
'@ant-design/icon
s'
import
{
LAYOUT_TYPE
}
from
'@/constant
s'
import
PlatformToolBar
from
'../components/toolBar/platform'
import
{
getMenuData
,
defaultDesignConfig
}
from
'./utils'
import
{
DesingConfigItemType
}
from
'./types'
...
...
@@ -270,7 +270,9 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
"4"
:
{
"componentName"
:
"PlatformIndex.MallMainNav"
,
"componentType"
:
PROPS_TYPES
.
mallNav
,
"props"
:
{},
"props"
:
{
type
:
LAYOUT_TYPE
.
platform
},
}
}
...
...
src/pages/pageCustomized/platformEdit/utils.ts
View file @
a5b666f8
...
...
@@ -33,6 +33,7 @@ export const getMenuData = () => {
"id"
:
0
,
"link"
:
`
${
REQUEST_HEADER
}
www.
${
TOP_DOMAIN
}
`
,
"name"
:
"首页"
,
"type"
:
1
,
"status"
:
true
,
"key"
:
"home"
,
},
...
...
@@ -40,6 +41,7 @@ export const getMenuData = () => {
"id"
:
1
,
"link"
:
`
${
REQUEST_HEADER
}${
enterpriseSubDomain
}
.
${
TOP_DOMAIN
}
`
,
"name"
:
"企业商城"
,
"type"
:
2
,
"status"
:
true
,
"key"
:
"enterpriseMall"
,
},
...
...
@@ -47,6 +49,7 @@ export const getMenuData = () => {
"id"
:
2
,
"link"
:
`
${
REQUEST_HEADER
}
srm.
${
TOP_DOMAIN
}
`
,
"name"
:
"名企采购"
,
"type"
:
3
,
"status"
:
true
,
"key"
:
"srm"
,
},
...
...
@@ -54,6 +57,7 @@ export const getMenuData = () => {
"id"
:
3
,
"link"
:
`
${
REQUEST_HEADER
}${
enterpriseSubDomain
}
.
${
TOP_DOMAIN
}
/stores`
,
"name"
:
"优选供应商"
,
"type"
:
4
,
"status"
:
true
,
"key"
:
"enterpriseMallStores"
,
},
...
...
@@ -61,6 +65,7 @@ export const getMenuData = () => {
"id"
:
4
,
"link"
:
`
${
REQUEST_HEADER
}${
channelSubDomain
}
.
${
TOP_DOMAIN
}
`
,
"name"
:
"渠道服务"
,
"type"
:
5
,
"status"
:
true
,
"key"
:
"channel"
,
},
...
...
@@ -68,6 +73,7 @@ export const getMenuData = () => {
"id"
:
5
,
"link"
:
`
${
REQUEST_HEADER
}
logistics.
${
TOP_DOMAIN
}
`
,
"name"
:
"物流服务"
,
"type"
:
6
,
"key"
:
"logistics"
,
"status"
:
true
,
},
...
...
@@ -75,6 +81,7 @@ export const getMenuData = () => {
"id"
:
6
,
"link"
:
`
${
REQUEST_HEADER
}
manufacture.
${
TOP_DOMAIN
}
`
,
"name"
:
"加工服务"
,
"type"
:
7
,
"status"
:
true
,
"key"
:
"process"
,
},
...
...
@@ -82,6 +89,7 @@ export const getMenuData = () => {
"id"
:
7
,
"link"
:
`
${
REQUEST_HEADER
}${
enterpriseSubDomain
}
.
${
TOP_DOMAIN
}
/integral`
,
"name"
:
"积分商城"
,
"type"
:
8
,
"status"
:
true
,
"key"
:
"enterprisePointsMall"
,
},
...
...
@@ -89,6 +97,7 @@ export const getMenuData = () => {
"id"
:
8
,
"link"
:
`
${
REQUEST_HEADER
}
info.
${
TOP_DOMAIN
}
`
,
"name"
:
"行情资讯"
,
"type"
:
9
,
"status"
:
true
,
"key"
:
"information"
,
},
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/MallNav/index.tsx
View file @
a5b666f8
...
...
@@ -6,6 +6,7 @@ import { ReactSortable } from "react-sortablejs"
import
{
useEffect
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
import
isEmpty
from
'lodash/isEmpty'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
cx
from
'classnames'
import
{
cloneDeep
}
from
'lodash'
import
upIcon
from
'@/asserts/icons/up_icon.png'
...
...
@@ -22,11 +23,12 @@ interface MenuItemType {
interface
MallNavProps
{
templateid
:
number
,
menuData
:
MenuItemType
[]
menuData
:
MenuItemType
[],
type
:
LAYOUT_TYPE
}
const
MallNav
:
React
.
FC
<
MallNavProps
>
=
(
props
)
=>
{
const
{
menuData
,
templateid
}
=
props
const
{
menuData
,
templateid
,
type
}
=
props
const
[
list
,
setList
]
=
useState
<
MenuItemType
[]
>
([])
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
newProps
,
setNewProps
]
=
useState
(
props
)
...
...
@@ -86,15 +88,22 @@ const MallNav: React.FC<MallNavProps> = (props) => {
}
setConfirmLoading
(
true
)
saveNav
(
newProps
).
then
(()
=>
{
if
(
type
===
LAYOUT_TYPE
.
platform
)
{
changeProps
({
props
:
newProps
})
clearSelectedStatus
()
setConfirmLoading
(
false
)
}).
catch
(()
=>
{
setConfirmLoading
(
false
)
})
}
else
{
saveNav
(
newProps
).
then
(()
=>
{
changeProps
({
props
:
newProps
})
clearSelectedStatus
()
setConfirmLoading
(
false
)
}).
catch
(()
=>
{
setConfirmLoading
(
false
)
})
}
}
const
sortUp
=
(
index
:
number
,
item
:
MenuItemType
)
=>
{
...
...
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