Commit 9b7a8ae0 by wd

顶部图片链接不存在时不添加属性进行网络请求

parent 53b3a4ee
......@@ -28,7 +28,11 @@ endif;
.sparsh-free-shipping-bar-goal-message{
width: 100%;
height: 60px;
background-image: url("<?= $block->getImgUrl($barData['background_img']) ?>");
<?php
if ($barData['background_img']){
echo 'background-image: url("' . $block->getImgUrl($barData['background_img']) .'");';
}
?>
line-height: 60px;
background-size: 100% 100%!important;
background-repeat: no-repeat;
......@@ -36,7 +40,11 @@ endif;
@media (max-width: 768px) {
.sparsh-free-shipping-bar-goal-message{
background-image: url("<?= $block->getImgUrl($barData['background_img_phone']) ?>");
<?php
if ($barData['background_img_phone']){
echo 'background-image: url("' . $block->getImgUrl($barData['background_img_phone']) .'");';
}
?>
width: 100%;
height: 40px;
line-height: 40px;
......
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