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
c1d48359
Commit
c1d48359
authored
Mar 12, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: app企业商城-优质推荐-品牌无法删除新增的问题
parent
66376958
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
index.tsx
src/pages/pageCustomized/mobileSettingPanel/index.tsx
+1
-1
index.tsx
...leSettingPanel/propsSettings/components/quality/index.tsx
+34
-3
No files found.
src/pages/pageCustomized/mobileSettingPanel/index.tsx
View file @
c1d48359
...
...
@@ -26,7 +26,7 @@ const MobileSettingPanel: React.FC = ()=> {
const
newProps
=
get
(
componentConfigs
,
[
selectedKey
,
'props'
],
oldProps
)
const
updateSelectInfo
=
{
...
selectedInfo
}
updateSelectInfo
.
props
=
newProps
console
.
log
(
JSON
.
stringify
(
newProps
))
setNewSelectInfo
(
updateSelectInfo
)
}
}
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/quality/index.tsx
View file @
c1d48359
...
...
@@ -273,12 +273,42 @@ const Quality: React.FC<QualityPropsType> = (props) => {
})
}
/**
* 删除品牌
* @param sort
*/
const
handleDeleteSelectBrandItem
=
async
(
id
:
number
,
delelteId
:
number
)
=>
{
const
newList
=
[...
list
]
for
(
const
item
of
newList
)
{
if
(
item
.
id
===
id
)
{
item
.
recommend
=
item
.
recommend
.
filter
(
recommendId
=>
recommendId
!==
delelteId
)
const
param
=
{
idList
:
item
.
recommend
}
const
result
=
await
PublicApi
.
postSearchMobileShopEnterpriseGetCategoryBrand
(
param
)
message
.
destroy
()
item
.
recommendList
=
result
.
data
}
}
setList
(
newList
)
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
dataList
:
newList
})
})
}
const
changeBrandData
=
(
list
:
any
[]
|
undefined
)
=>
{
if
(
list
)
{
le
t
newList
:
any
[]
=
[]
cons
t
newList
:
any
[]
=
[]
list
.
forEach
((
item
)
=>
{
if
(
item
.
brandResponseList
)
{
newList
=
[...
newList
,
...
item
.
brandResponseList
]
if
(
item
.
brandResponseList
&&
item
.
brandResponseList
.
length
>
0
){
item
.
brandResponseList
.
forEach
((
childItem
)
=>
{
if
(
newList
.
every
((
newItem
)
=>
newItem
.
id
!==
childItem
.
id
))
{
newList
.
push
(
childItem
)
}
})
}
}
});
return
newList
...
...
@@ -354,7 +384,7 @@ const Quality: React.FC<QualityPropsType> = (props) => {
<
div
className=
{
cx
(
styles
.
selectInfo
,
styles
.
shop
)
}
>
<
div
className=
{
styles
.
selectInfo_name
}
>
{
selectItem
.
name
}
</
div
>
</
div
>
<
div
className=
{
styles
.
selectInfoBox_delete
}
onClick=
{
()
=>
handleDeleteSelectItem
(
item
.
id
,
selectItem
.
id
)
}
>
<
div
className=
{
styles
.
selectInfoBox_delete
}
onClick=
{
()
=>
handleDeleteSelect
Brand
Item
(
item
.
id
,
selectItem
.
id
)
}
>
<
DeleteOutlined
/>
</
div
>
</
div
>
...
...
@@ -436,6 +466,7 @@ const Quality: React.FC<QualityPropsType> = (props) => {
idList
:
item
.
recommend
}
const
result
=
await
PublicApi
.
postSearchMobileShopEnterpriseGetCategoryBrand
(
param
)
message
.
destroy
()
item
.
recommendList
=
result
.
data
}
else
{
if
(
item
.
recommendList
)
{
...
...
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