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
16fe2ecb
Commit
16fe2ecb
authored
Aug 27, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: c端装修相关drawer修改
-增加活动跳转详情
parent
f88de4bd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
33 deletions
+60
-33
index.less
...eCustomized/components/drawers/commodityDrawer/index.less
+17
-0
index.tsx
...geCustomized/components/drawers/commodityDrawer/index.tsx
+17
-26
index.tsx
...pageCustomized/components/drawers/couponsDrawer/index.tsx
+5
-3
index.tsx
...el/propsSettings/components/marketingCardCoupon/index.tsx
+1
-0
index.less
...nel/propsSettings/components/marketingCardGood/index.less
+1
-0
index.tsx
...anel/propsSettings/components/marketingCardGood/index.tsx
+1
-1
index.less
...opsSettings/components/suggestProductCommodity/index.less
+1
-0
index.tsx
...ropsSettings/components/suggestProductCommodity/index.tsx
+17
-3
No files found.
src/pages/pageCustomized/components/drawers/commodityDrawer/index.less
View file @
16fe2ecb
...
...
@@ -30,5 +30,22 @@
}
}
}
.ant-table-expanded-row {
.ant-table-cell {
background-color: #fff;
}
}
}
}
.defaultTag {
display: inline-block;
padding: 0 8px;
font-size: 12px;
font-weight: 400;
color: #5C626A;
background: #fff;
border-radius: 4px;
border: 1px solid #EDEEEF;
}
src/pages/pageCustomized/components/drawers/commodityDrawer/index.tsx
View file @
16fe2ecb
...
...
@@ -40,7 +40,7 @@ const _returnCategoryList = (list: any, obj: any) => {
const
CommodityDrawer
:
React
.
FC
<
CommodityDrawerProps
>
=
(
props
:
CommodityDrawerProps
)
=>
{
const
{
visible
,
onClose
,
onConfirm
,
selectId
,
filterParam
,
selectType
=
'radio'
}
=
props
;
const
{
query
:
{
shopId
,
environment
}
}:
any
=
history
.
location
const
{
query
:
{
shopId
}
}:
any
=
history
.
location
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
(
selectId
?
[
selectId
]
:
[]);
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([]);
const
ref
=
useRef
<
any
>
({});
...
...
@@ -50,30 +50,22 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
},
[
selectId
])
const
expandedRowRender
=
(
record
:
any
)
=>
{
console
.
log
(
record
)
const
columns
=
[
{
title
:
'id'
,
dataIndex
:
'id'
,
key
:
'id'
,
render
:
(
_
,
_record
:
any
)
=>
(
<
Space
direction=
'horizontal'
style=
{
{
width
:
300
}
}
>
<
img
src=
{
ActivityImage
}
style=
{
{
width
:
24
,
height
:
24
,
borderRadius
:
4
}
}
/>
<
span
>
{
_record
?.
name
}
</
span
>
</
Space
>
)
}
]
let
data
:
any
=
[];
for
(
let
i
=
0
;
i
<
3
;
++
i
)
{
data
.
push
({
key
:
i
,
date
:
'2014-12-24 23:12:00'
,
name
:
'This is production name'
,
upgradeNum
:
'Upgraded: 56'
,
});
}
return
<
Table
columns=
{
columns
}
dataSource=
{
data
}
pagination=
{
false
}
showHeader=
{
false
}
/>;
return
(
<>
{
record
?.
activityList
?.
map
((
item
,
index
)
=>
{
return
(
<
div
key=
{
index
}
style=
{
{
marginBottom
:
8
}
}
>
<
Space
direction=
'horizontal'
>
<
img
src=
{
ActivityImage
}
style=
{
{
width
:
24
,
height
:
24
,
borderRadius
:
4
}
}
/>
<
span
>
{
item
?.
name
}
</
span
>
<
div
className=
{
styles
[
'defaultTag'
]
}
>
{
item
?.
type
}
</
div
>
<
StatusTag
title=
{
item
?.
belongType
===
1
?
'平台活动'
:
'商家活动'
}
type=
{
item
?.
belongType
===
1
?
'primary'
:
'success'
}
/>
</
Space
>
</
div
>
)
})
}
</>
);
}
const
columns
=
[
...
...
@@ -141,7 +133,6 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const
fetchTableData
=
async
(
params
:
any
)
=>
{
const
_params
=
{
...
params
,
// environment,
shopId
,
idNotInList
:
Array
.
isArray
(
selectId
)
?
selectId
:
[
selectId
],
...
filterParam
...
...
src/pages/pageCustomized/components/drawers/couponsDrawer/index.tsx
View file @
16fe2ecb
...
...
@@ -27,13 +27,15 @@ interface CouponsDrawerProps {
visible
:
boolean
,
onClose
:
()
=>
void
,
onConfirm
?:
(
record
)
=>
void
,
selectId
?:
number
selectId
?:
number
,
// 1平台,2商家
belongType
?:
1
|
2
}
const
CouponsDrawer
:
React
.
FC
<
CouponsDrawerProps
>
=
(
props
:
CouponsDrawerProps
)
=>
{
const
{
visible
,
onClose
,
onConfirm
,
selectId
}
=
props
;
const
{
visible
,
onClose
,
onConfirm
,
selectId
,
belongType
}
=
props
;
const
{
query
:
{
shopId
}
}:
any
=
history
.
location
const
[
type
,
setType
]
=
useState
(
1
);
const
[
type
,
setType
]
=
useState
(
belongType
||
1
);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
(
selectId
?
[
selectId
]
:
[]);
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([]);
const
ref
=
useRef
<
any
>
({});
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/marketingCardCoupon/index.tsx
View file @
16fe2ecb
...
...
@@ -84,6 +84,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
</
div
>
<
CouponsDrawer
visible=
{
drawerVisible
}
belongType=
{
belongType
}
onClose=
{
_onClose
}
onConfirm=
{
_onChooseConfirm
}
selectId=
{
id
}
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/marketingCardGood/index.less
View file @
16fe2ecb
...
...
@@ -89,6 +89,7 @@
align-items: center;
justify-content: center;
margin-bottom: 8px;
cursor: pointer;
img {
width: 24px;
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/marketingCardGood/index.tsx
View file @
16fe2ecb
...
...
@@ -217,7 +217,7 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
{
_record
?.
activityList
?.
map
((
item
)
=>
{
return
(
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
onClick=
{
()
=>
{
window
.
open
(
`/marketing/marketingSearch/preview?id=${item.id}`
)}
}
>
<
img
src=
{
ActivityImage
}
/>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
StatusTag
title=
{
item
.
type
}
type=
'danger'
/>
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/suggestProductCommodity/index.less
View file @
16fe2ecb
...
...
@@ -89,6 +89,7 @@
align-items: center;
justify-content: center;
margin-bottom: 8px;
cursor: pointer;
img {
width: 24px;
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/suggestProductCommodity/index.tsx
View file @
16fe2ecb
...
...
@@ -38,9 +38,15 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
useEffect
(()
=>
{
if
(
id
&&
id
!=
record
[
0
]?.
id
)
{
PublicApi
.
getProductCommodityGetCommodity
({
id
}).
then
((
res
)
=>
{
const
_params
:
any
=
{
shopId
,
idInList
:
id
,
current
:
1
,
pageSize
:
10
}
PublicApi
.
getMarketingAdornGoodsListAdorn
(
_params
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setRecord
(
res
.
data
);
setRecord
(
res
.
data
.
data
);
}
}).
catch
(
err
=>
console
.
log
(
err
))
}
else
if
(
!
id
)
{
...
...
@@ -115,6 +121,14 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
});
};
const
_handleToDetailPage
=
(
id
,
belongType
)
=>
{
if
(
belongType
===
1
)
{
window
.
open
(
`/marketing/marketingSearch/preview?id=
${
id
}
`
);
}
else
{
window
.
open
(
`/marketingManage/merchantMarketing/merchantMarketingSearch/preview?id=
${
id
}
`
);
}
}
const
_record
=
record
;
return
(
...
...
@@ -139,7 +153,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
<
div
className=
{
styles
[
'suggestProductCommodity-box-label'
]
}
>
商品活动
</
div
>
{
_record
?.
activityList
?.
map
((
item
)
=>
{
return
(
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList'
]
}
onClick=
{
()
=>
{
_handleToDetailPage
(
item
.
id
,
item
.
belongType
)
}
}
>
<
img
src=
{
ActivityImage
}
/>
<
div
className=
{
styles
[
'suggestProductCommodity-activityList-name'
]
}
>
{
item
.
name
}
</
div
>
<
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