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
陈智峰
jinfa-platform
Commits
df797987
Commit
df797987
authored
Jan 06, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
26a75089
918a681b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
list.tsx
src/pages/lxMall/shopList/list.tsx
+10
-10
No files found.
src/pages/lxMall/shopList/list.tsx
View file @
df797987
...
@@ -17,17 +17,17 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
...
@@ -17,17 +17,17 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
const
{
shopList
}
=
props
const
{
shopList
}
=
props
const
renderCommodityPrice
=
(
unitPrice
)
=>
{
const
renderCommodityPrice
=
(
unitPrice
)
=>
{
le
t
price
=
0
// cons
t price = 0
if
(
unitPrice
)
{
//
if (unitPrice) {
const
priceArr
=
[]
//
const priceArr = []
Object
.
keys
(
unitPrice
).
forEach
(
key
=>
{
//
Object.keys(unitPrice).forEach(key => {
priceArr
.
push
(
unitPrice
[
key
])
//
priceArr.push(unitPrice[key])
})
//
})
price
=
priceArr
[
0
]
||
0
//
price = priceArr[0] || 0
}
//
}
return
<
div
className=
{
styles
.
shop_list_goods_item_price
}
>
return
<
div
className=
{
styles
.
shop_list_goods_item_price
}
>
<
span
className=
{
styles
.
unit
}
>
¥
</
span
>
<
span
className=
{
styles
.
unit
}
>
¥
</
span
>
<
span
>
{
priceFormat
(
p
rice
)
}
</
span
>
<
span
>
{
priceFormat
(
unitP
rice
)
}
</
span
>
</
div
>
</
div
>
}
}
...
@@ -90,7 +90,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
...
@@ -90,7 +90,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
<
div
className=
{
styles
.
shop_list_goods_item_imgbox_img
}
style=
{
{
backgroundImage
:
`url(${commodityItem.mainPic})`
}
}
></
div
>
<
div
className=
{
styles
.
shop_list_goods_item_imgbox_img
}
style=
{
{
backgroundImage
:
`url(${commodityItem.mainPic})`
}
}
></
div
>
</
div
>
</
div
>
{
{
renderCommodityPrice
(
commodityItem
.
unitPrice
)
renderCommodityPrice
(
commodityItem
.
min
)
}
}
</
div
>
</
div
>
</
Link
>
</
Link
>
...
...
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