提交 cb1fa85b 作者: 翁进城

商城列表更改广告接口

上级 bd5c8cdf
......@@ -25,7 +25,7 @@ export interface DeviceListResp {
export interface Ad {
id: number
imageUrl: string
bannerImg: string
}
export default {
......@@ -34,7 +34,9 @@ export default {
return request('/pms/product/mall/deviceList', 'post', params, options)
},
//产品商城广告位
ad: (): Promise<Response<Array<Ad>>> => {
return request('/pms/webProductMall/ad')
listBannerImg: () => {
return request('/release/module/listBannerImg', 'get', {
moduleCode: 'PRODUCT_MARKETP'
})
},
}
......@@ -64,9 +64,9 @@ export default function Mall(props: Props) {
//广告请求
useEffect(() => {
api.ad().then((res) => {
setAdList(res.result || [])
})
api.listBannerImg().then((res) => {
setAdList(res.result || []);
});
}, [])
const onFilterChange = (
......@@ -88,9 +88,9 @@ export default function Mall(props: Props) {
}
return (
<Layout>
<div className="page" style={{ paddingTop: '18px' }}>
<div className="page" style={{ paddingTop: "18px" }}>
<Filter
types={['类目', '地域', '品牌', '部件' /* "型号", "成色" */]}
types={["地域"]}
showResultItem
onChange={onFilterChange}
></Filter>
......@@ -157,18 +157,18 @@ export default function Mall(props: Props) {
<Image
key={item.id}
className={styles.ad}
src={item.imageUrl}
src={item.bannerImg}
width={189}
height={295}
preview={false}
fallback={errImg}
></Image>
)
);
})}
</div>
</div>
</div>
</div>
</Layout>
)
);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论