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
ab54e95f
Commit
ab54e95f
authored
Sep 18, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
bfc533f4
c1c4756f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
52 deletions
+97
-52
returnSaveParams.ts
src/pages/editor/components/toolBar/returnSaveParams.ts
+19
-19
index.tsx
...propsSettings/components/bottomNavigationClient/index.tsx
+43
-7
index.tsx
...ttingPanel/propsSettings/components/cardNavItem/index.tsx
+4
-1
index.tsx
src/pages/editor/mobileSettingPanel/propsSettings/index.tsx
+2
-2
config.ts
src/pages/mobileTemplate/shopTemplateEdit/config.ts
+21
-21
index.tsx
src/pages/mobileTemplate/shopTemplateEdit/index.tsx
+8
-2
No files found.
src/pages/editor/components/toolBar/returnSaveParams.ts
View file @
ab54e95f
...
...
@@ -530,26 +530,26 @@ export const paramsShop = (
}
break
;
// 底部导航
case
'9'
:
propsData
=
get
(
pageConfig
,
[
'9'
,
'props'
])
||
{}
childNodes
=
get
(
pageConfig
,
[
'9'
,
'childNodes'
])
||
{}
_params
.
adornContent
.
bottom
=
{
style
:
propsData
.
styleTheme
||
0
,
status
:
true
,
details
:
[]
}
if
(
childNodes
&&
Array
.
isArray
(
childNodes
)
&&
childNodes
.
length
>
0
)
{
for
(
let
key
in
childNodes
)
{
tempProps
=
pageConfig
[
childNodes
[
key
]]?.
props
||
{}
!
isEmpty
(
tempProps
)
&&
_params
.
adornContent
.
bottom
.
details
.
push
({
defaultIcon
:
tempProps
.
defaultIcon
,
selectIcon
:
tempProps
.
selectIcon
,
name
:
tempProps
.
name
,
type
:
tempProps
.
type
,
});
case
'9'
:
propsData
=
get
(
pageConfig
,
[
'9'
,
'props'
])
||
{}
childNodes
=
get
(
pageConfig
,
[
'9'
,
'childNodes'
])
||
{}
_params
.
adornContent
.
bottom
=
{
style
:
propsData
.
styleTheme
||
0
,
status
:
true
,
details
:
[]
}
}
break
if
(
childNodes
&&
Array
.
isArray
(
childNodes
)
&&
childNodes
.
length
>
0
)
{
for
(
let
key
in
childNodes
)
{
tempProps
=
pageConfig
[
childNodes
[
key
]]?.
props
||
{}
!
isEmpty
(
tempProps
)
&&
_params
.
adornContent
.
bottom
.
details
.
push
({
defaultIcon
:
tempProps
.
defaultIcon
,
selectIcon
:
tempProps
.
selectIcon
,
name
:
tempProps
.
name
,
type
:
tempProps
.
type
,
});
}
}
break
}
})
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/bottomNavigationClient/index.tsx
View file @
ab54e95f
...
...
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
import
{
Input
,
Select
}
from
'antd'
;
import
{
PlusCircleOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
changeProps
}
from
'@lingxi-disign/core'
;
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
UploadImage
from
'@/components/UploadImage'
;
import
uploadImgIcon
from
'@/assets/icons/upload_img_icon.svg'
...
...
@@ -22,10 +22,38 @@ interface BottomNavigationClientProps {
// 当前选中组件的key
selectedKey
?:
any
,
// 1.B端 2.C端 3.SRM
property
?:
1
|
2
|
3
property
?:
1
|
2
|
3
,
layoutType
:
LAYOUT_TYPE
}
const
RedirectTypeList
=
[
const
shopRedirectTypeList
=
[
{
value
:
1
,
label
:
'首页'
,
},
{
value
:
2
,
label
:
'全部商品'
,
},
{
value
:
3
,
label
:
'分类'
,
},
{
value
:
4
,
label
:
'积分兑换'
,
},
{
value
:
5
,
label
:
'店铺会员'
,
},
{
value
:
6
,
label
:
'商家信息'
,
},
];
const
ChannelRedirectTypeList
=
[
{
value
:
1
,
label
:
'首页'
,
...
...
@@ -53,7 +81,7 @@ const RedirectTypeList = [
];
const
BottomNavigationClient
:
React
.
FC
<
BottomNavigationClientProps
>
=
(
props
:
BottomNavigationClientProps
)
=>
{
const
{
defaultIcon
,
selectIcon
,
name
,
type
,
property
=
2
,
selectedKey
}
=
props
;
const
{
defaultIcon
,
selectIcon
,
name
,
type
,
layoutType
,
selectedKey
}
=
props
;
const
_isNull
=
(
list
)
=>
{
let
_number
=
0
;
...
...
@@ -91,17 +119,25 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo
});
}
const
_getNavLinkType
=
useMemo
(()
=>
{
if
(
layoutType
===
LAYOUT_TYPE
.
shop
)
{
return
shopRedirectTypeList
}
else
{
return
ChannelRedirectTypeList
}
},
[
layoutType
])
return
(
<
div
className=
{
styles
[
'bottomNavigationClient'
]
}
>
<
div
className=
{
styles
[
'bottomNavigationClient-box'
]
}
>
<
div
className=
{
styles
[
'bottomNavigationClient-box-label'
]
}
>
名称
</
div
>
<
Input
key=
{
`${selectedKey}-name`
}
defaultValue=
{
name
}
onBlur=
{
_onChangeName
}
/>
<
Input
key=
{
`${selectedKey}-name`
}
d
isabled=
{
type
===
1
}
d
efaultValue=
{
name
}
onBlur=
{
_onChangeName
}
/>
</
div
>
<
div
className=
{
styles
[
'bottomNavigationClient-box'
]
}
>
<
div
className=
{
styles
[
'bottomNavigationClient-box-label'
]
}
>
链接
</
div
>
<
Select
key=
{
`${selectedKey}-type`
}
defaultValue=
{
type
}
onChange=
{
_onChangeType
}
style=
{
{
width
:
'100%'
}
}
>
<
Select
key=
{
`${selectedKey}-type`
}
d
isabled=
{
type
===
1
}
d
efaultValue=
{
type
}
onChange=
{
_onChangeType
}
style=
{
{
width
:
'100%'
}
}
>
{
RedirectTypeList
?.
map
(
selectItem
=>
<
Select
.
Option
value=
{
selectItem
.
value
}
key=
{
`redirect_type_${selectItem.value}`
}
>
{
selectItem
.
label
}
</
Select
.
Option
>)
_getNavLinkType
?.
map
(
selectItem
=>
<
Select
.
Option
value=
{
selectItem
.
value
}
key=
{
`redirect_type_${selectItem.value}`
}
>
{
selectItem
.
label
}
</
Select
.
Option
>)
}
</
Select
>
</
div
>
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/cardNavItem/index.tsx
View file @
ab54e95f
...
...
@@ -15,7 +15,6 @@ import { priceFormat } from '@/utils/numberFomat';
import
{
getAuth
}
from
'@/utils/auth'
import
styles
from
'./index.less'
;
interface
CardNavItemProps
{
name
:
string
,
/** 跳转类型:1-品类导航 2.活动导航 3.频道导航 4.外部链接 */
...
...
@@ -143,6 +142,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
}
}
if
(
key
===
'type'
)
{
newProps
[
'id'
]
=
""
}
changeProps
({
title
:
title
?
title
:
name
,
props
:
Object
.
assign
({
...
props
},
newProps
)
...
...
src/pages/editor/mobileSettingPanel/propsSettings/index.tsx
View file @
ab54e95f
...
...
@@ -27,11 +27,11 @@ interface PropsSettingsPropsType {
}
const
PropsSettings
:
React
.
FC
<
PropsSettingsPropsType
>
=
(
props
)
=>
{
const
{
selectedInfo
,
shopId
,
pageConfig
}
=
props
const
{
selectedInfo
,
shopId
,
layoutType
,
pageConfig
}
=
props
const
renderSettingItem
=
()
=>
{
const
{
props
:
initProps
,
propsConfig
,
parentKey
}
=
selectedInfo
||
{};
const
_props
=
{
...
initProps
,
shopId
,
selectedKey
:
selectedInfo
?.
selectedKey
}
const
_props
=
{
...
initProps
,
shopId
,
layoutType
,
selectedKey
:
selectedInfo
?.
selectedKey
}
const
componentType
=
propsConfig
?.
componentType
if
(
componentType
)
{
...
...
src/pages/mobileTemplate/shopTemplateEdit/config.ts
View file @
ab54e95f
...
...
@@ -129,25 +129,25 @@ export const defaultConfig: PageConfigType = {
canEdit
:
true
,
canHide
:
false
,
},
//
'9': {
//
title: '底部标签栏',
//
componentName: 'BottomNavigation',
//
props: {},
//
childNodes: ['10'],
//
childComponentName: 'BottomNavigation.Items',
//
addBtnText: '添加标签',
//
maxLength: 5,
//
},
//
'10': {
//
loop: '${bottom}',
//
title: '${item.name}',
//
componentName: 'BottomNavigation.Items',
//
props: {
//
defaultIcon: '${item.defaultIcon}',
//
selectIcon: '${item.selectIcon}',
//
name: '${item.name}',
//
type: '${item.type}',
//
isnull: false,
//
},
//
},
'9'
:
{
title
:
'底部标签栏'
,
componentName
:
'BottomNavigation'
,
props
:
{},
childNodes
:
[
'10'
],
childComponentName
:
'BottomNavigation.Items'
,
addBtnText
:
'添加标签'
,
maxLength
:
5
,
},
'10'
:
{
loop
:
'${bottom}'
,
title
:
'${item.name}'
,
componentName
:
'BottomNavigation.Items'
,
props
:
{
defaultIcon
:
'${item.defaultIcon}'
,
selectIcon
:
'${item.selectIcon}'
,
name
:
'${item.name}'
,
type
:
'${item.type}'
,
isnull
:
false
,
},
},
}
src/pages/mobileTemplate/shopTemplateEdit/index.tsx
View file @
ab54e95f
...
...
@@ -238,7 +238,13 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
navList
:
appConfig
?.
navList
?
appConfig
?.
navList
.
details
:
[],
advert
:
appConfig
?.
advert
?
appConfig
?.
advert
.
details
:
[],
commodityList
:
[],
bottom
:
appConfig
?.
bottom
?
appConfig
?.
bottom
.
details
:
[],
bottom
:
appConfig
?.
bottom
?
appConfig
?.
bottom
.
details
:
[{
defaultIcon
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/grid@2xf2a5b4c6612742759d5fcf322e2d6102.png'
,
selectIcon
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/Icon@2x(3)06695cb1e9904ae1a7a0b8ec73d29cb0.png'
,
name
:
'首页'
,
type
:
1
,
isnull
:
false
,
}],
}
if
(
appConfig
?.
commodity
)
{
...
...
@@ -1012,7 +1018,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
_other
=
{
...
_other
,
...
_marketingConfig_19
};
!
_mallLayoutConfig
[
'0'
].
childNodes
.
includes
(
'11-19'
)
&&
_mallLayoutConfig
[
'0'
].
childNodes
.
push
(
'11-19'
);
}
_mallLayoutConfig
[
'0'
].
childNodes
=
[...
_mallLayoutConfig
[
'0'
].
childNodes
,
'8'
,
'6'
]
_mallLayoutConfig
[
'0'
].
childNodes
=
[...
_mallLayoutConfig
[
'0'
].
childNodes
,
'8'
,
'6'
,
'9'
]
const
config
=
{
...
_mallLayoutConfig
,
...
...
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