前台商品列表
This commit is contained in:
parent
18798aab5b
commit
782cc0d571
|
|
@ -21,7 +21,7 @@ class CategoryController extends Controller
|
|||
|
||||
$data = [
|
||||
'category' => $category,
|
||||
'products' => $products,
|
||||
'products' => $products->jsonSerialize(),
|
||||
];
|
||||
|
||||
return view('category', $data);
|
||||
|
|
|
|||
|
|
@ -29,10 +29,13 @@ class ProductList extends JsonResource
|
|||
'id' => $this->id,
|
||||
'name' => $this->description->name ?? '',
|
||||
'url' => shop_route('products.show', ['product' => $this]),
|
||||
'price' => $this->price,
|
||||
'origin_price' => $this->origin_price,
|
||||
'images' => image_resize($this->images[0] ?? ''),
|
||||
'price_format' => currency_format($this->price),
|
||||
'price' => $this->master_sku->price,
|
||||
'origin_price' => $this->master_sku->origin_price,
|
||||
'images' => array_map(function ($item){
|
||||
return image_resize($item, 400, 400);
|
||||
}, array_merge($this->images ?? [], $this->master_sku->images ?? [])),
|
||||
'price_format' => currency_format($this->master_sku->price),
|
||||
'origin_price_format' => currency_format($this->master_sku->origin_price),
|
||||
'category_id' => $this->category_id ?? null,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -691,8 +691,7 @@ table.table.table-striped > tbody > tr:nth-of-type(2n) {
|
|||
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
src: url("/vendor/iconfont/iconfont.woff") format("woff"), url("/vendor/iconfont/iconfont.ttf") format("truetype");
|
||||
/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||
src: url("/vendor/iconfont/iconfont.woff") format("woff"), url("/vendor/iconfont/iconfont.ttf") format("truetype"); /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,7 @@
|
|||
@charset "UTF-8";
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
src: url("/vendor/iconfont/iconfont.woff") format("woff"), url("/vendor/iconfont/iconfont.ttf") format("truetype");
|
||||
/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||
src: url("/vendor/iconfont/iconfont.woff") format("woff"), url("/vendor/iconfont/iconfont.ttf") format("truetype"); /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ body.page-filemanager {
|
|||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
/* CSS3属性 */
|
||||
user-select: none; /* CSS3属性 */
|
||||
}
|
||||
body.page-filemanager [class*=" el-icon-"], body.page-filemanager [class^=el-icon-] {
|
||||
font-weight: 600;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
@charset "UTF-8";
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
src: url("/vendor/iconfont/iconfont.woff") format("woff"), url("/vendor/iconfont/iconfont.ttf") format("truetype");
|
||||
/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||
src: url("/vendor/iconfont/iconfont.woff") format("woff"), url("/vendor/iconfont/iconfont.ttf") format("truetype"); /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont";
|
||||
|
|
@ -1154,12 +1153,9 @@ body.page-account-address .addresses-wrap .item .address-bottom a, body.page-che
|
|||
}
|
||||
|
||||
.swiper.module-slideshow {
|
||||
--swiper-theme-color: #ff6600;
|
||||
/* 设置Swiper风格 */
|
||||
--swiper-navigation-color: #ff6600;
|
||||
/* 单独设置按钮颜色 */
|
||||
--swiper-navigation-size: 30px;
|
||||
/* 设置按钮大小 */
|
||||
--swiper-theme-color: #ff6600; /* 设置Swiper风格 */
|
||||
--swiper-navigation-color: #ff6600; /* 单独设置按钮颜色 */
|
||||
--swiper-navigation-size: 30px; /* 设置按钮大小 */
|
||||
}
|
||||
.swiper.module-slideshow .swiper-button-prev, .swiper.module-slideshow .swiper-button-next {
|
||||
display: none;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,8 @@
|
|||
<div class="product-wrap">
|
||||
<div class="image"><a href="{{ $product->url }}"><img src="{{ image_resize($product->images[0]??'', 300, 300) }}" class="img-fluid"></a></div>
|
||||
<div class="product-name">{{ $product->description->name }}</div>
|
||||
<div class="image"><a href="{{ $product['url'] }}"><img src="{{ $product['images'][0] ?? image_resize('', 400, 400) }}" class="img-fluid"></a></div>
|
||||
<div class="product-name">{{ $product['name'] }}</div>
|
||||
<div class="product-price">
|
||||
<span class="price-new">{{ $product->master_sku->price }}</span>
|
||||
<span class="price-lod">{{ $product->master_sku->origin_price }}</span>
|
||||
<span class="price-new">{{ $product['price_format'] }}</span>
|
||||
<span class="price-lod">{{ $product['origin_price_format'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue