Commit e5f69e85 by lmf

优化首页pc端顶部轮播图样式

parent e2342b6b
......@@ -67,12 +67,12 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
<div class="actions-primary">
<?php if ($_item->isSaleable()) :?>
<?php if (!$_item->getTypeInstance()->isPossibleBuyFromList($_item)) :?>
<button class="action tocart primary"
<a class="action tocart primary"
data-mage-init='{"redirectUrl":{"url":"<?= $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}'
type="button"
title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
<span><?= $block->escapeHtml(__('Add')) ?></span>
</button>
<span><?= $block->escapeHtml(__('Add Cart')) ?></span>
</a>
<?php else :?>
<?php
$postDataHelper = $this->helper(Magento\Framework\Data\Helper\PostHelper::class);
......@@ -81,12 +81,12 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
['product' => (int) $_item->getEntityId()]
)
?>
<button class="action tocart primary"
<a class="action tocart primary"
data-post='<?= /* @noEscape */ $postData ?>'
type="button"
title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
<span><?= $block->escapeHtml(__('Add')) ?></span>
</button>
<span><?= $block->escapeHtml(__('Add Cart')) ?></span>
</a>
<?php endif; ?>
<?php else :?>
<?php if ($_item->isAvailable()) :?>
......
......@@ -616,6 +616,7 @@ ul {
@media (min-width: 768px){
.box-pc{
display: block;
margin-top: -6px;
}
.box-moblie{
display: none;
......
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