From e6b42fd2a2f5e3e9dff44c2fa949aea5b81b8dbe Mon Sep 17 00:00:00 2001 From: songliang Date: Thu, 4 Aug 2022 17:38:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=93=81=E7=89=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Shop/Http/Resources/BrandDetail.php | 2 +- public/build/beike/shop/default/css/app.css | 17 ++++++++++------- .../shop/default/css/module/module-brand.scss | 6 +++++- .../beike/shop/default/css/page-product.scss | 2 +- .../beike/shop/default/css/product-style.scss | 4 ++-- themes/default/design/brand.blade.php | 10 +++++++--- themes/default/shared/product.blade.php | 8 ++++---- 7 files changed, 30 insertions(+), 19 deletions(-) diff --git a/beike/Shop/Http/Resources/BrandDetail.php b/beike/Shop/Http/Resources/BrandDetail.php index e37f6086..14427853 100644 --- a/beike/Shop/Http/Resources/BrandDetail.php +++ b/beike/Shop/Http/Resources/BrandDetail.php @@ -23,7 +23,7 @@ class BrandDetail extends JsonResource return [ 'id' => $this->id, 'name' => $this->name, - 'logo' => image_resize($this->logo), + 'logo' => image_origin($this->logo), 'sort_order' => $this->sort_order, 'url'=> shop_route('brands.show', $this->id), 'first' => $this->first, diff --git a/public/build/beike/shop/default/css/app.css b/public/build/beike/shop/default/css/app.css index 6650a6c3..4d717e5e 100644 --- a/public/build/beike/shop/default/css/app.css +++ b/public/build/beike/shop/default/css/app.css @@ -588,7 +588,7 @@ footer .footer-bottom { display: flex; justify-content: center; } -.product-wrap .image .button-wrap a { +.product-wrap .image .button-wrap button { color: white; display: block; margin: 4px; @@ -596,12 +596,12 @@ footer .footer-bottom { width: 36px; height: 38px; text-align: center; - line-height: 38px; + line-height: 35px; border-radius: 4px; text-decoration: none; position: relative; } -.product-wrap .image .button-wrap a > span { +.product-wrap .image .button-wrap button > span { font-size: 11px; text-transform: none; line-height: 18px; @@ -615,7 +615,7 @@ footer .footer-bottom { left: 50%; transform: translate(-50%); } -.product-wrap .image .button-wrap a > span::before { +.product-wrap .image .button-wrap button > span::before { content: ""; border: 5px solid transparent; border-top-color: #000; @@ -624,7 +624,7 @@ footer .footer-bottom { left: 50%; margin-left: -5px; } -.product-wrap .image .button-wrap a:hover span { +.product-wrap .image .button-wrap button:hover span { opacity: 1; bottom: calc(100% + 7px); z-index: 2; @@ -712,7 +712,7 @@ body.page-product .product-image .left .swiper > div > div { border: 1px solid #eee; margin-bottom: 10px; width: 80px; - height: 80px; + height: 80px !important; padding: 2px; cursor: pointer; } @@ -1290,9 +1290,12 @@ body.page-list .curser > li > a:hover { align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07); - margin-bottom: 30px; + margin-bottom: 10px; height: 90px; } +.module-brand .brand-item > img { + max-height: 100%; +} .module-tab-product .module-title { margin-bottom: 1rem; diff --git a/resources/beike/shop/default/css/module/module-brand.scss b/resources/beike/shop/default/css/module/module-brand.scss index 7f0843b8..ed364363 100644 --- a/resources/beike/shop/default/css/module/module-brand.scss +++ b/resources/beike/shop/default/css/module/module-brand.scss @@ -6,7 +6,11 @@ align-items: center; // flex-start | center justify-content: center; // flex-end | center | space-between box-shadow: 0 6px 18px rgba(0, 0, 0, .07); - margin-bottom: 30px; + margin-bottom: 10px; height: 90px; + + >img { + max-height: 100%; + } } } \ No newline at end of file diff --git a/resources/beike/shop/default/css/page-product.scss b/resources/beike/shop/default/css/page-product.scss index c4ab640e..279897f2 100644 --- a/resources/beike/shop/default/css/page-product.scss +++ b/resources/beike/shop/default/css/page-product.scss @@ -21,7 +21,7 @@ body.page-product { border: 1px solid #eee; margin-bottom: 10px; width: 80px; - height: 80px; + height: 80px !important; padding: 2px; cursor: pointer; diff --git a/resources/beike/shop/default/css/product-style.scss b/resources/beike/shop/default/css/product-style.scss index 898d8023..bd64f46d 100644 --- a/resources/beike/shop/default/css/product-style.scss +++ b/resources/beike/shop/default/css/product-style.scss @@ -32,7 +32,7 @@ display: flex; justify-content: center; - a { + button { color: white; display: block; margin: 4px; @@ -40,7 +40,7 @@ width: 36px; height: 38px; text-align: center; - line-height: 38px; + line-height: 35px; border-radius: 4px; text-decoration: none; position: relative; diff --git a/themes/default/design/brand.blade.php b/themes/default/design/brand.blade.php index 2131da1c..e63f1c76 100644 --- a/themes/default/design/brand.blade.php +++ b/themes/default/design/brand.blade.php @@ -11,14 +11,18 @@ @endif
+ {{-- {{ dd($content) }} --}}
{{ $content['title'] }}
- @for ($i = 0; $i < 8; $i++) + @foreach ($content['brands'] as $brand)
-
+
+ +
+

{{ $brand['name'] }}

- @endfor + @endforeach
diff --git a/themes/default/shared/product.blade.php b/themes/default/shared/product.blade.php index 9299e0d0..2ad70c4d 100644 --- a/themes/default/shared/product.blade.php +++ b/themes/default/shared/product.blade.php @@ -9,14 +9,14 @@
- + +
{{ $product['name'] }}