Commit ff197365 authored by GuanHua's avatar GuanHua

fix: 商品评价添加shopId字段查询

parent 301e31ae
...@@ -12,11 +12,12 @@ import styles from './index.less' ...@@ -12,11 +12,12 @@ import styles from './index.less'
interface CommentPropsType { interface CommentPropsType {
productIds: number[], productIds: number[],
setCount: Function setCount: Function,
storeId: number,
} }
const Comment: React.FC<CommentPropsType> = (props) => { const Comment: React.FC<CommentPropsType> = (props) => {
const { productIds, setCount } = props const { productIds, setCount, storeId } = props
const [current, setCurrent] = useState<number>(1) const [current, setCurrent] = useState<number>(1)
const [pageSize] = useState<number>(10) const [pageSize] = useState<number>(10)
const [totalCount, setTotalCount] = useState<number>(0) const [totalCount, setTotalCount] = useState<number>(0)
...@@ -45,7 +46,8 @@ const Comment: React.FC<CommentPropsType> = (props) => { ...@@ -45,7 +46,8 @@ const Comment: React.FC<CommentPropsType> = (props) => {
const param: any = { const param: any = {
current, current,
pageSize, pageSize,
productIds: productIds.toString() // '2339' productIds: productIds.toString(), // '2339'
shopId: storeId,
} }
if (type === 'good') { if (type === 'good') {
param.starLevel = 3 param.starLevel = 3
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-01-18 16:40:59 * @Date: 2021-01-18 16:40:59
* @LastEditTime: 2021-02-23 14:31:36 * @LastEditTime: 2021-02-25 09:45:52
* @LastEditors: your name * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /lingxi-business-paltform/src/pages/lxMall/commodityDetail/components/ProductDescription/index.tsx * @FilePath: /lingxi-business-paltform/src/pages/lxMall/commodityDetail/components/ProductDescription/index.tsx
*/ */
...@@ -79,7 +79,7 @@ const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => { ...@@ -79,7 +79,7 @@ const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => {
</Anchor> </Anchor>
<Introduction commodityDetail={commodityDetail} /> <Introduction commodityDetail={commodityDetail} />
<TradeRecord productIds={productIds} storeId={storeId} setCount={(count) => setTradeRecordCount(count)} /> <TradeRecord productIds={productIds} storeId={storeId} setCount={(count) => setTradeRecordCount(count)} />
<Comment productIds={productIds} setCount={(count) => setCommentCount(count)} /> <Comment productIds={productIds} storeId={storeId} setCount={(count) => setCommentCount(count)} />
<Recommand dataList={dataList} {...props} /> <Recommand dataList={dataList} {...props} />
</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