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
project
jinfa-admin
Commits
b398a006
Commit
b398a006
authored
Aug 27, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改c端商城的推荐商品tags
-map增加key
parent
bd1a49ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
index.tsx
src/pages/pageCustomized/mobileClientEdit/index.tsx
+6
-6
preview.tsx
src/pages/pageCustomized/mobileClientEdit/preview.tsx
+1
-1
index.tsx
...anel/propsSettings/components/marketingCardGood/index.tsx
+3
-3
index.tsx
...ropsSettings/components/suggestProductCommodity/index.tsx
+2
-2
No files found.
src/pages/pageCustomized/mobileClientEdit/index.tsx
View file @
b398a006
...
@@ -827,16 +827,16 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
...
@@ -827,16 +827,16 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
// 商品推荐
// 商品推荐
const
_details
=
appConfig
?.
adornContent
?.
suggestProduct
?.
details
;
const
_details
=
appConfig
?.
adornContent
?.
suggestProduct
?.
details
;
if
(
_details
.
length
>
0
)
{
if
(
_details
.
length
>
0
)
{
for
(
let
index
in
_details
)
{
for
(
let
index
in
_details
)
{
const
item
=
_details
[
index
];
const
item
=
_details
[
index
];
const
_newKey
=
`10-
${
Number
(
index
)
+
1
}
`
;
const
_newKey
=
`10-
${
Number
(
index
)
+
1
}
`
;
!
_suggestProductConfig
[
'10'
].
childNodes
.
includes
(
_newKey
)
&&
_suggestProductConfig
[
'10'
].
childNodes
.
push
(
_newKey
)
!
_suggestProductConfig
[
'10'
].
childNodes
.
includes
(
_newKey
)
&&
_suggestProductConfig
[
'10'
].
childNodes
.
push
(
_newKey
)
_suggestProductConfig
[
_newKey
]
=
{
_suggestProductConfig
[
_newKey
]
=
{
key
:
_newKey
,
key
:
_newKey
,
title
:
item
?.
title
||
'商品容器'
,
title
:
item
?.
title
||
'商品容器'
,
componentName
:
'SuggestProduct.Items'
,
canEdit
:
true
,
canEdit
:
true
,
canHide
:
false
,
canHide
:
false
,
componentName
:
'SuggestProduct.Items'
,
props
:
{
props
:
{
...
item
,
...
item
,
isnull
:
false
isnull
:
false
...
@@ -849,15 +849,15 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
...
@@ -849,15 +849,15 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
if
(
item
.
customize
)
{
if
(
item
.
customize
)
{
const
_ids
=
item
.
customize
.
map
((
item
)
=>
item
.
id
).
join
(
','
);
const
_ids
=
item
.
customize
.
map
((
item
)
=>
item
.
id
).
join
(
','
);
const
_detailsData
=
await
PublicApi
.
getMarketingAdornGoodsListAdorn
({
shopId
,
idInList
:
_ids
,
current
:
'1'
,
pageSize
:
'100'
})
const
_detailsData
=
await
PublicApi
.
getMarketingAdornGoodsListAdorn
({
shopId
,
idInList
:
_ids
,
current
:
'1'
,
pageSize
:
'100'
})
_detailsData
.
data
.
data
?.
forEach
((
child
,
childIndex
)
=>
{
_detailsData
.
data
.
data
?.
forEach
((
child
,
childIndex
)
=>
{
const
_childNewKey
=
`
${
_newKey
}
-
${
Number
(
childIndex
)
+
1
}
`
;
const
_childNewKey
=
`
${
_newKey
}
-
${
Number
(
childIndex
)
+
1
}
`
;
!
_suggestProductConfig
[
_newKey
].
childNodes
.
includes
(
_childNewKey
)
&&
_suggestProductConfig
[
_newKey
].
childNodes
.
push
(
_childNewKey
)
!
_suggestProductConfig
[
_newKey
].
childNodes
.
includes
(
_childNewKey
)
&&
_suggestProductConfig
[
_newKey
].
childNodes
.
push
(
_childNewKey
)
_suggestProductConfig
[
_childNewKey
]
=
{
_suggestProductConfig
[
_childNewKey
]
=
{
key
:
_childNewKey
,
key
:
_childNewKey
,
title
:
child
?.
name
,
title
:
child
?.
name
,
componentName
:
'SuggestProduct.Commodity'
,
canEdit
:
true
,
canEdit
:
true
,
canHide
:
false
,
canHide
:
false
,
componentName
:
'SuggestProduct.Commodity'
,
props
:
{
props
:
{
...
child
,
...
child
,
name
:
child
.
name
,
name
:
child
.
name
,
...
@@ -865,7 +865,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
...
@@ -865,7 +865,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'vertical'
,
mode
:
'vertical'
,
discountPrice
:
priceFormat
(
child
.
min
),
discountPrice
:
priceFormat
(
child
.
min
),
buyBtn
:
false
,
buyBtn
:
false
,
tags
:
item
.
customize
[
childIndex
]
.
tags
,
tags
:
item
.
customize
.
filter
((
filChild
)
=>
filChild
.
id
===
child
.
id
)?.[
0
]?
.
tags
,
},
},
}
}
})
})
...
...
src/pages/pageCustomized/mobileClientEdit/preview.tsx
View file @
b398a006
...
@@ -865,7 +865,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
...
@@ -865,7 +865,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
mode
:
'vertical'
,
mode
:
'vertical'
,
discountPrice
:
priceFormat
(
child
.
min
),
discountPrice
:
priceFormat
(
child
.
min
),
buyBtn
:
false
,
buyBtn
:
false
,
tags
:
item
.
customize
[
childIndex
]
.
tags
,
tags
:
item
.
customize
.
filter
((
filChild
)
=>
filChild
.
id
===
child
.
id
)?.[
0
]?
.
tags
,
},
},
}
}
})
})
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/marketingCardGood/index.tsx
View file @
b398a006
...
@@ -168,7 +168,7 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
...
@@ -168,7 +168,7 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
childNodes
:
[],
childNodes
:
[],
}
}
item
?.
list
?.
forEach
((
child
,
childIndex
)
=>
{
item
?.
list
?.
forEach
((
child
,
childIndex
)
=>
{
_groupOriginalPrice
=
_groupOriginalPrice
+
Number
(
child
.
price
)
;
_groupOriginalPrice
=
_groupOriginalPrice
+
Number
(
child
.
price
);
const
_childKey
=
`
${
_tabKey
}
-
${
Number
(
childIndex
)
+
1
}
`
;
const
_childKey
=
`
${
_tabKey
}
-
${
Number
(
childIndex
)
+
1
}
`
;
_pageConfig
[
_childKey
]
=
{
_pageConfig
[
_childKey
]
=
{
title
:
child
.
productName
,
title
:
child
.
productName
,
...
@@ -215,9 +215,9 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
...
@@ -215,9 +215,9 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
</
div
>
</
div
>
<
div
className=
{
styles
[
'suggestProductCommodity-box'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-box'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
{
_record
?.
activityList
?.
map
((
item
)
=>
{
{
_record
?.
activityList
?.
map
((
item
,
index
)
=>
{
return
(
return
(
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
onClick=
{
()
=>
{
window
.
open
(
`/marketing/marketingSearch/preview?id=${item.id}`
)
}
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
key=
{
index
}
onClick=
{
()
=>
{
window
.
open
(
`/marketing/marketingSearch/preview?id=${item.id}`
)
}
}
>
<
img
src=
{
ActivityImage
}
/>
<
img
src=
{
ActivityImage
}
/>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
StatusTag
title=
{
item
.
type
}
type=
'danger'
/>
<
StatusTag
title=
{
item
.
type
}
type=
'danger'
/>
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/suggestProductCommodity/index.tsx
View file @
b398a006
...
@@ -151,9 +151,9 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
...
@@ -151,9 +151,9 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
</
div
>
</
div
>
<
div
className=
{
styles
[
'suggestProductCommodity-box'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-box'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
{
_record
?.
activityList
?.
map
((
item
)
=>
{
{
_record
?.
activityList
?.
map
((
item
,
index
)
=>
{
return
(
return
(
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
onClick=
{
()
=>
{
_handleToDetailPage
(
item
.
id
,
item
.
belongType
)
}
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
key=
{
index
}
onClick=
{
()
=>
{
_handleToDetailPage
(
item
.
id
,
item
.
belongType
)
}
}
>
<
img
src=
{
ActivityImage
}
/>
<
img
src=
{
ActivityImage
}
/>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
StatusTag
title=
{
item
.
type
}
type=
'danger'
/>
<
StatusTag
title=
{
item
.
type
}
type=
'danger'
/>
...
...
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