Commit 01bf0aba authored by GuanHua's avatar GuanHua

fix: 店铺装修选择商品传参问题修复

parent a2e3d999
......@@ -7,6 +7,7 @@ import CommodityDrawer from '@/pages/editor/components/drawer/commodityDrawer'
import ActivityImage from '@/assets/couponIcons/ActivityImage.svg';
import { getAuth } from '@/utils/auth'
import StatusTag from '@/components/StatusTag'
import { LAYOUT_TYPE } from '@/constants'
import { priceFormat } from '@/utils/numberFomat'
import styles from './index.less';
......@@ -22,11 +23,12 @@ interface RecommendCommodityProps {
customize?: any,
// 当前选中组件的key
selectedKey?: any,
shopId: number
shopId: number,
layoutType: LAYOUT_TYPE
}
const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendCommodityProps) => {
const { title, categoryId, num, idList = [], dataList = [], manageWay, selectedKey, shopId } = props;
const { title, categoryId, num, idList = [], dataList = [], manageWay, layoutType, selectedKey, shopId } = props;
const [categoryList, setCategoryList] = useState<{label: string, value: number}[]>([])
const [commodityVisible, setCommodityVisible] = useState<boolean>(false);
const { memberId, memberRoleId } = getAuth() || {}
......@@ -194,6 +196,7 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
{_recordDetail}
<CommodityDrawer
selectId={idList}
layoutType={layoutType}
visible={commodityVisible}
onClose={_onCommodityClose}
onConfirm={_onChooseConfirm}
......@@ -201,7 +204,7 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
filterParam={{
memberId,
memberRoleId,
customerCategory: categoryId
customerCategoryId: categoryId
}}
/>
</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