From 470d5cf21cb53371337fdef84f87cf2c31136eda Mon Sep 17 00:00:00 2001 From: pushuo Date: Fri, 13 Jan 2023 11:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E7=B1=BB=E7=AD=9B?= =?UTF-8?q?=E9=80=89=20ui=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/default/css/page-categories.scss | 13 ++++++++++ resources/beike/shop/default/js/common.js | 26 +++++++------------ themes/default/cart/cart.blade.php | 2 +- themes/default/checkout.blade.php | 2 +- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/resources/beike/shop/default/css/page-categories.scss b/resources/beike/shop/default/css/page-categories.scss index d37d79f6..b669437a 100644 --- a/resources/beike/shop/default/css/page-categories.scss +++ b/resources/beike/shop/default/css/page-categories.scss @@ -199,3 +199,16 @@ body.page-categories { } } } + +.filter-box { + .attribute-item { + .form-check-label { + cursor: pointer; + &:hover { + .form-check-input { + border-color: $primary; + } + } + } + } +} \ No newline at end of file diff --git a/resources/beike/shop/default/js/common.js b/resources/beike/shop/default/js/common.js index a93a5094..02cf36a2 100644 --- a/resources/beike/shop/default/js/common.js +++ b/resources/beike/shop/default/js/common.js @@ -3,7 +3,7 @@ * @link https://beikeshop.com * @Author pu shuo * @Date 2022-09-09 19:16:39 - * @LastEditTime 2022-11-07 09:29:34 + * @LastEditTime 2023-01-13 11:29:27 */ export default { @@ -92,26 +92,18 @@ export default { $(document).ready(() => { if (!$('.fixed-top-line').length) return; if ($(window).width() < 768) return; - const totalWrapTop = $('.fixed-top-line').offset().top; - const totalWrapWidth = $('.fixed-top-line').outerWidth(); - const totalWrapHeight = $('.fixed-top-line').outerHeight(); - const totalWrapLeft = $('.fixed-top-line').offset().left; - const footerTop = $('footer').offset().top; - const footerMarginTop = Math.abs(parseInt($('footer').css("marginTop"))); + const [fTop, tLeft] = [$('.fixed-top-line'), $('.fixed-top-left')] + const fTopTop = fTop.offset().top; + const fTopWidth = fTop.outerWidth(); + const fTopHeight = fTop.outerHeight(); $(window).scroll(function () { - if ($(this).scrollTop() > totalWrapTop) { - $('.fixed-top-line').css({position: 'fixed', top: 0, bottom: 'auto', 'width': totalWrapWidth}) - if (!$('.total-old').length) { - $('.fixed-top-line').before('
'); - } + const topLeftHeight = tLeft.outerHeight(); - if ($(this).scrollTop() + totalWrapHeight > footerTop - footerMarginTop) { - $('.fixed-top-line').css({position: 'absolute', top: 'auto', bottom: '0', 'width': totalWrapWidth}) - } + if ($(this).scrollTop() > fTopTop && topLeftHeight > fTopHeight) { + fTop.css({position: 'fixed', top: 0, bottom: 'auto', 'width': fTopWidth}) } else { - $('.total-old').remove(); - $('.fixed-top-line').removeAttr('style') + fTop.removeAttr('style') } }) }) diff --git a/themes/default/cart/cart.blade.php b/themes/default/cart/cart.blade.php index 3d9b9fec..b9d86d7c 100644 --- a/themes/default/cart/cart.blade.php +++ b/themes/default/cart/cart.blade.php @@ -23,7 +23,7 @@
-
+

{{ __('shop/carts.commodity') }}

diff --git a/themes/default/checkout.blade.php b/themes/default/checkout.blade.php index 31ca164f..ed3d9513 100644 --- a/themes/default/checkout.blade.php +++ b/themes/default/checkout.blade.php @@ -19,7 +19,7 @@
-
+
@include('checkout._address')