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
linweijiong
jinfa-platform
Commits
20cdb407
Commit
20cdb407
authored
Mar 02, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 渠道商品获取库存传参问题
parent
37562e6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+12
-2
No files found.
src/pages/lxMall/commodityDetail/index.tsx
View file @
20cdb407
...
...
@@ -351,6 +351,9 @@ const CommodityDetail = (props) => {
},
[
selectAttrVal
,
commodityDetail
])
/**
* 获取商品价格区间
*/
const
getCommodityPriceRange
=
()
=>
{
if
(
commodityDetail
?.
unitPricePicList
)
{
for
(
const
item
of
commodityDetail
?.
unitPricePicList
)
{
...
...
@@ -366,13 +369,20 @@ const CommodityDetail = (props) => {
setSelectCommodityUnitPriceId
(
item
.
commodityUnitPriceAndPicId
)
setCurrentPriceRange
(
sortUnitPrice
(
item
.
unitPrice
))
setAttrAndValList
(
item
)
getStockCountByProductId
(
item
.
id
)
let
productId
:
number
=
item
.
id
if
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
{
productId
=
item
.
commodityUnitPriceAndPicId
}
getStockCountByProductId
(
productId
)
}
}
}
}
/**
* 根据商品skuid获取商品库存数量
* @param productId
*/
const
getStockCountByProductId
=
(
productId
:
number
)
=>
{
const
param
:
any
=
{
productId
,
...
...
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