|
|
|
@ -15,6 +15,7 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
|
|
|
|
|
const [info, setInfo] = useState<API.PbcProductVO>({});
|
|
|
|
|
const [images, setImages] = useState<string[]>([]);
|
|
|
|
|
const [detailImages, setDetailImages] = useState<string[]>([]);
|
|
|
|
|
|
|
|
|
|
const getInfo = () => {
|
|
|
|
|
if (params.id) {
|
|
|
|
@ -25,6 +26,10 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
const arr = res.data.pbcProductImages.split(',');
|
|
|
|
|
setImages(arr);
|
|
|
|
|
}
|
|
|
|
|
if (res.data.pbcProductDetailImages) {
|
|
|
|
|
const arr = res.data.pbcProductDetailImages.split(',');
|
|
|
|
|
setDetailImages(arr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -126,11 +131,24 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="相册图片" span={3}>
|
|
|
|
|
<div style={{ display: 'flex', width: '100%', flexWrap: 'wrap' }}>
|
|
|
|
|
<Image.PreviewGroup>
|
|
|
|
|
{images.map((e) => (
|
|
|
|
|
<div key={e} style={{ marginBottom: 10, marginRight: 20 }}>
|
|
|
|
|
<Image width={100} src={e} />
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</Image.PreviewGroup>
|
|
|
|
|
</div>
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="详情图" span={3}>
|
|
|
|
|
<div style={{ display: 'flex', width: '100%', flexWrap: 'wrap' }}>
|
|
|
|
|
<Image.PreviewGroup>
|
|
|
|
|
{detailImages.map((e) => (
|
|
|
|
|
<div key={e} style={{ marginBottom: 10, marginRight: 20 }}>
|
|
|
|
|
<Image width={100} src={e} />
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</Image.PreviewGroup>
|
|
|
|
|
</div>
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label="规格" span={3}>
|
|
|
|
|