Commit 65278b2a authored by GuanHua's avatar GuanHua

fix: 商品交易记录添加商城id的传参

parent 918740b7
......@@ -8,11 +8,12 @@ import styles from './index.less'
interface TradeRecordPropsType {
productIds: number[],
setCount: Function
setCount: Function,
storeId: number,
}
const TradeRecord: React.FC<TradeRecordPropsType> = (props) => {
const { productIds, setCount } = props
const { productIds, setCount, storeId } = props
const [current, setCurrent] = useState<number>(1)
const [pageSize] = useState<number>(10)
const [totalCount, setTotalCount] = useState<number>(0)
......@@ -28,6 +29,7 @@ const TradeRecord: React.FC<TradeRecordPropsType> = (props) => {
const param: any = {
current,
pageSize,
shopId: storeId,
productIds: productIds.toString() // '2339'
}
......
/*
* @Author: your name
* @Date: 2021-01-18 16:40:59
* @LastEditTime: 2021-02-23 14:31:36
* @LastEditors: your name
* @Description: In User Settings Edit
* @FilePath: /lingxi-business-paltform/src/pages/lxMall/commodityDetail/components/ProductDescription/index.tsx
*/
import React, { useState, useEffect } from 'react'
import { Anchor, BackTop } from 'antd'
import Comment from './components/Comment'
......@@ -14,10 +22,11 @@ const { Link } = Anchor
interface ProductDescriptionPropsType {
commodityDetail: GetSearchShopStoreGetCommodityDetailResponse,
dataList: any,
storeId: number,
}
const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => {
const { commodityDetail, dataList } = props
const { commodityDetail, dataList, storeId } = props
const [currentAnchor, setCurrentAnchor] = useState<string>("#introduction")
const [productIds, setProductIds] = useState<number[]>([])
const [tradeRecordCount, setTradeRecordCount] = useState<number>(0)
......@@ -69,7 +78,7 @@ const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => {
</BackTop>
</Anchor>
<Introduction commodityDetail={commodityDetail} />
<TradeRecord productIds={productIds} setCount={(count) => setTradeRecordCount(count)} />
<TradeRecord productIds={productIds} storeId={storeId} setCount={(count) => setTradeRecordCount(count)} />
<Comment productIds={productIds} setCount={(count) => setCommentCount(count)} />
<Recommand dataList={dataList} {...props} />
</div>
......
......@@ -1173,7 +1173,7 @@ const CommodityDetail = (props) => {
<Interested priceType={commodityDetail?.priceType} shopInfo={shopInfo} {...props} />
</div>
<div className={styles.commodity_detail_body_right}>
<ProductDescription commodityDetail={commodityDetail} dataList={commonCategoryCommodityList} {...props} />
<ProductDescription storeId={storeId} commodityDetail={commodityDetail} dataList={commonCategoryCommodityList} {...props} />
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment