提交 cb1fa85b 作者: 翁进城

商城列表更改广告接口

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