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
7154accd
Commit
7154accd
authored
Sep 17, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改平台活动页套装bug
parent
5357fc12
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
62 deletions
+64
-62
UploadFiles.tsx
src/components/UploadFiles/UploadFiles.tsx
+1
-1
index.tsx
...ng/marketingActivitiesManagement/activePage/add/index.tsx
+2
-1
index.tsx
...esManagement/activePage/fixtures/common/configs/index.tsx
+3
-3
themeItem.tsx
...age/fixtures/components/ActivityAreaSetting/themeItem.tsx
+2
-2
index.tsx
...ePage/fixtures/components/Layouts/CommodityList/index.tsx
+42
-40
useGetLayout.tsx
...stomized/categoryNavigation/common/hooks/useGetLayout.tsx
+2
-12
ProductContainer.tsx
...vigation/components/Layout/Commodity/ProductContainer.tsx
+1
-0
index.less
...vigation/components/Layout/SecondaryNavigation/index.less
+9
-2
index.tsx
...avigation/components/Layout/SecondaryNavigation/index.tsx
+2
-1
No files found.
src/components/UploadFiles/UploadFiles.tsx
View file @
7154accd
...
...
@@ -72,7 +72,7 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
},
styles
.
renderFileContainer
,
fileContainerClassName
);
const
uploadProps
=
{
disable
:
disable
,
disable
d
:
disable
,
name
:
'file'
,
fileList
:
files
,
accept
:
accept
,
...
...
src/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/add/index.tsx
View file @
7154accd
...
...
@@ -83,12 +83,13 @@ const Add = () => {
okText
:
'立即装修'
,
cancelText
:
'稍后'
,
onOk
:
()
=>
{
history
.
push
(
`/marketingManage/marketing/activitiesManagement/fixtures?id=
${
data
.
id
}
`
);
history
.
push
(
`/marketingManage/marketing/activitiesManagement/fixtures?id=
${
data
}
`
);
},
onCancel
:
()
=>
{
history
.
goBack
();
}
});
return
;
}
history
.
goBack
();
}
...
...
src/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/common/configs/index.tsx
View file @
7154accd
...
...
@@ -359,9 +359,9 @@ const activityContainer: PageConfigType = {
componentName
:
'CommodityList'
,
childComponentName
:
"CommodityList.Item"
,
addBtnText
:
'添加商品'
,
title
:
'
组合促销
'
,
title
:
'
秒杀
'
,
props
:
{
title
:
'
组合促销
'
,
title
:
'
秒杀
'
,
theme
:
0
},
otherProps
:
{
...
...
@@ -371,7 +371,7 @@ const activityContainer: PageConfigType = {
},
"17-1"
:
{
componentName
:
'CommodityList.Item'
,
title
:
'
组合促销
-商品'
,
title
:
'
秒杀
-商品'
,
props
:
{},
addBtnText
:
'添加'
},
...
...
src/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/ActivityAreaSetting/themeItem.tsx
View file @
7154accd
...
...
@@ -19,8 +19,8 @@ const ThemeItem: React.FC<Iprops> = (props: Iprops) => {
return
(
<
div
className=
{
styles
.
container
}
>
<
img
className=
{
styles
.
img
}
/>
<
span
className=
{
styles
.
name
}
>
竖向布局
</
span
>
{
/* <img className={styles.img} /> */
}
<
span
className=
{
styles
.
name
}
>
{
name
}
</
span
>
<
Radio
value=
{
theme
}
onChange=
{
handleChange
}
checked=
{
checked
}
/>
</
div
>
);
...
...
src/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/Layouts/CommodityList/index.tsx
View file @
7154accd
...
...
@@ -128,7 +128,7 @@ CommodityList.Item = CommodityItem;
/** 套装商品 */
const
CommodityTab
:
React
.
FC
<
any
>
=
(
props
)
=>
{
const
{
isEmpty
,
id
,
productName
,
productImgUrl
,
price
,
goodsSubList
}
=
props
;
const
{
isEmpty
,
id
,
productName
,
productImgUrl
,
price
,
goodsSub
sidiaryGroup
List
}
=
props
;
const
[
activeKey
,
setActiveKey
]
=
useState
<
string
>
(
"1"
);
console
.
log
(
"CommodityTab"
,
props
);
...
...
@@ -143,7 +143,7 @@ const CommodityTab: React.FC<any> = (props) => {
return
(
<
div
className=
{
styles
.
customizeTabBar
}
>
{
tabInfo
.
map
((
_item
)
=>
{
tabInfo
?
.
map
((
_item
)
=>
{
return
(
<
span
onClick=
{
()
=>
setActiveKey
(
_item
.
key
)
}
...
...
@@ -188,47 +188,49 @@ const CommodityTab: React.FC<any> = (props) => {
/>
</
div
>
<
div
className=
{
styles
.
tab
}
>
<
Tabs
activeKey=
{
activeKey
}
renderTabBar=
{
renderTabBar
}
>
{
goodsSubList
.
map
((
_item
,
_index
)
=>
{
const
{
groupNo
,
groupPrice
,
list
}
=
_item
;
const
discountPrice
=
groupPrice
?.
toString
().
split
(
"."
);
const
allTotal
=
list
.
reduce
((
sum
,
_current
)
=>
sum
+=
_current
.
price
,
0
);
return
(
<
TabPane
key=
{
_item
.
groupNo
.
toString
()
}
tab=
"套装1"
>
{
list
.
map
((
_row
,
_key
)
=>
{
return
(
<
div
className=
{
styles
.
groupCommodityItem
}
key=
{
_item
}
>
<
Commodity
name=
{
_row
.
productName
}
image=
{
_row
.
productImgUrl
}
mode=
"vertical"
footer=
{
<
div
></
div
>
}
tags=
{
[
"满300减20"
]
}
style=
{
{
padding
:
'0'
}
}
></
Commodity
>
<
Tabs
activeKey=
{
activeKey
}
renderTabBar=
{
renderTabBar
}
>
{
goodsSubsidiaryGroupList
?.
map
((
_item
,
_index
)
=>
{
const
{
groupNo
,
groupPrice
,
goodsSubsidiaryGroupDetailsList
}
=
_item
;
const
discountPrice
=
groupPrice
?.
toString
().
split
(
"."
);
const
allTotal
=
goodsSubsidiaryGroupDetailsList
.
reduce
((
sum
,
_current
)
=>
sum
+=
_current
.
price
,
0
);
return
(
<
TabPane
key=
{
_item
.
groupNo
.
toString
()
}
tab=
{
`套装${_index + 1}`
}
>
<
div
className=
{
styles
.
groupPane
}
>
{
goodsSubsidiaryGroupDetailsList
?.
map
((
_row
,
_key
)
=>
{
return
(
<
div
className=
{
styles
.
groupCommodityItem
}
key=
{
_item
}
>
<
Commodity
name=
{
_row
.
productName
}
image=
{
_row
.
productImgUrl
}
mode=
"vertical"
footer=
{
<
div
></
div
>
}
tags=
{
[
"满300减20"
]
}
style=
{
{
padding
:
'0'
}
}
></
Commodity
>
</
div
>
);
})
}
</
div
>
<
div
className=
{
styles
.
footer
}
>
<
div
className=
{
styles
.
price
}
>
<
div
className=
{
styles
.
discount
}
>
¥
<
span
className=
{
styles
.
priceInt
}
>
{
discountPrice
[
0
]
}
</
span
>
.
<
span
>
{
discountPrice
?.[
1
]
||
'00'
}
</
span
>
</
div
>
<
span
className=
{
styles
.
originalPrice
}
>
¥
{
allTotal
+
price
}
</
span
>
</
div
>
);
})
}
<
div
className=
{
styles
.
footer
}
>
<
div
className=
{
styles
.
price
}
>
<
div
className=
{
styles
.
discount
}
>
¥
<
span
className=
{
styles
.
priceInt
}
>
{
discountPrice
[
0
]
}
</
span
>
.
<
span
>
{
discountPrice
?.[
1
]
||
'00'
}
</
span
>
<
div
className=
{
styles
.
button
}
>
<
span
>
立即抢购
</
span
>
</
div
>
<
span
className=
{
styles
.
originalPrice
}
>
¥
{
allTotal
+
price
}
</
span
>
</
div
>
<
div
className=
{
styles
.
button
}
>
<
span
>
立即抢购
</
span
>
</
div
>
</
div
>
</
TabPane
>
);
})
}
</
Tabs
>
</
TabPane
>
);
})
}
</
Tabs
>
</
div
>
</>
...
...
src/pages/pageCustomized/categoryNavigation/common/hooks/useGetLayout.tsx
View file @
7154accd
...
...
@@ -2,23 +2,13 @@ import React, { useEffect, useState } from 'react';
import
{
updatePageConfig
}
from
'@lingxi-disign/core'
;
import
{
cloneDeep
}
from
'lodash'
;
import
pageConfig
from
'../schema/pageConfig'
;
import
mock
from
'../mock/index.json'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
const
getData
=
async
()
=>
{
const
random
=
Math
.
floor
(
Math
.
random
()
*
3
)
+
1
;
return
new
Promise
((
resolve
)
=>
{
setTimeout
(()
=>
{
resolve
(
mock
);
},
random
);
});
};
function
useGetLayout
()
{
const
[
info
,
setInfo
]
=
useState
<
any
>
(
null
);
const
{
id
}
=
usePageStatus
();
const
[
dataSourceFromRequest
,
setDataSourceFromRequest
]
=
useState
<
any
>
(
null
)
const
[
dataSourceFromRequest
,
setDataSourceFromRequest
]
=
useState
<
any
>
(
null
)
;
useEffect
(()
=>
{
async
function
fetchData
()
{
...
...
@@ -50,7 +40,7 @@ function useGetLayout() {
};
const
grandSonCompoentMap
=
{
"secondary"
:
'SecondaryNavigation.Item'
,
secondary
:
'SecondaryNavigation.Item'
,
flashSale
:
'SimpleCommodityList.Item'
,
saleRanking
:
'SimpleCommodityList.Item'
,
brand
:
"CategoryList.Item"
,
...
...
src/pages/pageCustomized/categoryNavigation/components/Layout/Commodity/ProductContainer.tsx
View file @
7154accd
...
...
@@ -10,6 +10,7 @@ const ProductContainer = (props) => {
alignItems
:
'stretch'
,
padding
:
'16 0'
,
minHeight
:
'20px'
,
border
:
'1px solid red'
,
// backgroundColor: 'red',
};
const
itemStyle
=
{
...
...
src/pages/pageCustomized/categoryNavigation/components/Layout/SecondaryNavigation/index.less
View file @
7154accd
...
...
@@ -16,9 +16,16 @@
margin-bottom: 12px;
.content {
width: 40px;
height: 40px;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 4px;
// background-color: red;
.image {
width: 40px;
height: 40px;
}
}
.empty {
...
...
src/pages/pageCustomized/categoryNavigation/components/Layout/SecondaryNavigation/index.tsx
View file @
7154accd
...
...
@@ -59,7 +59,8 @@ const Item = (props) => {
return
(
<
div
className=
{
styles
.
item
}
>
<
div
{
...
divProps
}
className=
{
wrapClass
}
>
<
img
src=
{
icon
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
/>
<
img
src=
{
icon
}
className=
{
styles
.
image
}
/>
<
div
className=
{
styles
.
name
}
>
{
name
}
</
div
>
</
div
>
</
div
>
);
...
...
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