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
ccabbf5e
Commit
ccabbf5e
authored
Sep 28, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 店铺装修问题媳妇
parent
96b6db53
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
effect.ts
src/pages/editor/components/drawer/commodityDrawer/effect.ts
+8
-0
index.tsx
src/pages/editor/components/drawer/commodityDrawer/index.tsx
+4
-3
index.tsx
...nel/propsSettings/components/recommendCommodity/index.tsx
+4
-4
No files found.
src/pages/editor/components/drawer/commodityDrawer/effect.ts
View file @
ccabbf5e
...
...
@@ -6,6 +6,8 @@ export const searchBrandOptionEffect = (
shopId
:
any
,
context
:
any
,
fieldName
:
string
,
memberId
,
memberRoleId
,
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getSearchCommodityTemplateGetBrandList
({
...
...
@@ -13,6 +15,8 @@ export const searchBrandOptionEffect = (
pageSize
:
'100'
,
name
:
state
.
props
[
'x-component-props'
].
searchValue
,
shopId
,
memberId
,
memberRoleId
,
}).
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
?.
data
?.
map
(
item
=>
{
...
...
@@ -29,10 +33,14 @@ export const searchCustomerCategoryOptionEffect = (
shopId
:
any
,
context
:
any
,
fieldName
:
string
,
memberId
,
memberRoleId
,
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getSearchCommodityTemplateGetFirstCategoryListByMemberId
({
shopId
,
memberId
,
memberRoleId
,
}).
then
(
res
=>
{
// PublicApi.getProductPlatformGetCategoryTree().then(res => {
context
.
setFieldState
(
fieldName
,
state
=>
{
...
...
src/pages/editor/components/drawer/commodityDrawer/index.tsx
View file @
ccabbf5e
...
...
@@ -14,7 +14,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import
StatusTag
from
'@/components/StatusTag'
import
CustomInputSearch
from
'@/components/NiceForm/components/CustomInputSearch'
import
CustomCategorySearch
from
'@/components/NiceForm/components/CustomCategorySearch'
import
{
getAuth
}
from
'@/utils/auth'
import
ActivityImage
from
'@/assets/couponIcons/ActivityImage.svg'
;
import
styles
from
'./index.less'
;
...
...
@@ -46,6 +46,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([]);
const
[
expandedRowKeys
,
setExpandedRowKeys
]
=
useState
<
any
>
([]);
const
ref
=
useRef
<
any
>
({});
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{}
useEffect
(()
=>
{
setSelectedRowKeys
(
selectId
?
[
selectId
]
:
[]);
...
...
@@ -210,10 +211,10 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
FORM_FILTER_PATH
,
);
FormEffectHooks
.
onFieldChange$
(
'brandId'
).
subscribe
(
state
=>
{
searchBrandOptionEffect
(
shopId
,
actions
,
'brandId'
)
searchBrandOptionEffect
(
shopId
,
actions
,
'brandId'
,
memberId
,
memberRoleId
)
})
FormEffectHooks
.
onFieldChange$
(
'categoryId'
).
subscribe
(
state
=>
{
searchCustomerCategoryOptionEffect
(
shopId
,
actions
,
'categoryId'
)
searchCustomerCategoryOptionEffect
(
shopId
,
actions
,
'categoryId'
,
memberId
,
memberRoleId
)
})
},
components
:
{
ModalSearch
:
Search
,
DateRangePickerUnix
,
Submit
,
CustomInputSearch
,
CustomCategorySearch
},
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/recommendCommodity/index.tsx
View file @
ccabbf5e
...
...
@@ -63,10 +63,10 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
const
_onChooseConfirm
=
(
record
)
=>
{
const
newList
=
[...
dataList
,
...
record
]
if
(
newList
.
length
>
4
)
{
message
.
error
(
'最多选择四件商品'
)
return
}
//
if (newList.length > 4) {
//
message.error('最多选择四件商品')
//
return
//
}
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
idList
:
[...
idList
,
...
record
.
map
((
item
)
=>
item
.
id
)],
...
...
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