Commit 8bb21a8b authored by GuanHua's avatar GuanHua

fix:修改模板装修商品列表询价商品价格的显示

parent d34f48c4
......@@ -9,6 +9,26 @@ const GoodsItem: React.FC<GoodsItemPropsType> = (props) => {
const { dataInfo = {} } = props
const renderPriceByType = (info: any) => {
switch (info.priceType) {
case 1:
return (
<div className={styles.goods_item_info_price}>
<i></i>
<span>{dataInfo.priceRange || dataInfo.goodsPrice}</span>
</div>
)
case 2:
return (
<div className={styles.inquiry_price}>
<label>在线询价</label>
</div>
)
default:
break
}
}
return (
<div className={styles.goods_item}>
<div className={styles.goods_item_imgbox}>
......@@ -16,10 +36,7 @@ const GoodsItem: React.FC<GoodsItemPropsType> = (props) => {
</div>
<div className={styles.goods_item_info}>
<div className={styles.goods_item_info_name}>{dataInfo.goodsName}</div>
<div className={styles.goods_item_info_price}>
<i></i>
<span>{dataInfo.priceRange || dataInfo.goodsPrice}</span>
</div>
{renderPriceByType(dataInfo)}
<div className={styles.goods_item_info_brief}>
<span>品类:</span>
<span>{dataInfo.categoryName}</span>
......
......@@ -14,6 +14,17 @@
}
}
.inquiry_price {
color: #FFF;
background-color: #D32F2F;
font-size: 12px;
height: 18px;
line-height: 14px;
padding: 2px 8px;
display: inline-block;
margin-top: 2px;
}
&_info {
flex: 1;
width: 0;
......
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