C端SKU数量小于等于1不展示chip
后端修复规格轴数据错乱显示问题
This commit is contained in:
@@ -140,7 +140,8 @@ export default function ProductDetailPage() {
|
||||
|
||||
const attrs = product?.specAttrs ?? [];
|
||||
const skus = product?.skus ?? [];
|
||||
const specEnabled = !!(product?.specEnabled && attrs.length > 0);
|
||||
const onSaleSkuCount = skus.filter((s) => s.status === 'ON_SALE').length;
|
||||
const specEnabled = onSaleSkuCount > 1 && attrs.length > 0;
|
||||
const activeSku = useMemo(() => {
|
||||
if (!product) return undefined;
|
||||
if (!specEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user