完善 商品、分类 TDK等
This commit is contained in:
parent
53689a70c2
commit
89725cb383
|
|
@ -4,6 +4,7 @@ namespace Beike\Admin\Http\Controllers;
|
|||
|
||||
use Beike\Models\Category;
|
||||
use Illuminate\Http\Request;
|
||||
use Beike\Repositories\LanguageRepo;
|
||||
use Beike\Repositories\CategoryRepo;
|
||||
use Beike\Admin\Services\CategoryService;
|
||||
use Beike\Admin\Http\Requests\CategoryRequest;
|
||||
|
|
@ -73,6 +74,7 @@ class CategoryController extends Controller
|
|||
|
||||
$data = [
|
||||
'category' => $category ?? new Category(),
|
||||
'languages' => LanguageRepo::all(),
|
||||
'descriptions' => $descriptions ?? null,
|
||||
'categories' => CategoryRepo::flatten(locale()),
|
||||
'_redirect' => $this->getRedirect(),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class ProductController extends Controller
|
|||
$product = ProductRepo::getProductDetail($product);
|
||||
$data = [
|
||||
'product' => (new ProductDetail($product))->jsonSerialize(),
|
||||
'relations' => ProductRepo::getProductsByIds($relationIds),
|
||||
'relations' => ProductRepo::getProductsByIds($relationIds)->jsonSerialize(),
|
||||
];
|
||||
$data = hook_filter('product.show', $data);
|
||||
return view('product', $data);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -35,6 +35,31 @@
|
|||
</select>
|
||||
</x-admin::form.row>
|
||||
|
||||
<x-admin::form.row title="Meta title">
|
||||
@foreach ($languages as $language)
|
||||
<div class="input-group w-max-600">
|
||||
<span class="input-group-text wp-100">{{ $language['name'] }}</span>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_title]" class="form-control wp-400" placeholder="Meta title">{{ old('meta_title', $category->descriptions->keyBy('locale')[$language->code]->meta_title ?? '') }}</textarea>
|
||||
</div>
|
||||
@endforeach
|
||||
</x-admin::form.row>
|
||||
<x-admin::form.row title="Meta keywords">
|
||||
@foreach ($languages as $language)
|
||||
<div class="input-group w-max-600">
|
||||
<span class="input-group-text wp-100">{{ $language['name'] }}</span>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_keywords]" class="form-control wp-400" placeholder="Meta keywords">{{ old('meta_keywords', $category->descriptions->keyBy('locale')[$language->code]->meta_keywords ?? '') }}</textarea>
|
||||
</div>
|
||||
@endforeach
|
||||
</x-admin::form.row>
|
||||
<x-admin::form.row title="Meta description">
|
||||
@foreach ($languages as $language)
|
||||
<div class="input-group w-max-600">
|
||||
<span class="input-group-text wp-100">{{ $language['name'] }}</span>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_description]" class="form-control wp-400" placeholder="Meta description">{{ old('meta_description', $category->descriptions->keyBy('locale')[$language->code]->meta_description ?? '') }}</textarea>
|
||||
</div>
|
||||
@endforeach
|
||||
</x-admin::form.row>
|
||||
|
||||
<x-admin-form-switch title="{{ __('common.status') }}" name="active" :value="old('active', $category->active ?? 1)" />
|
||||
|
||||
<x-admin::form.row>
|
||||
|
|
|
|||
|
|
@ -330,11 +330,11 @@
|
|||
</div>
|
||||
@endforeach
|
||||
</x-admin::form.row>
|
||||
<x-admin::form.row title="Meta keyword">
|
||||
<x-admin::form.row title="Meta keywords">
|
||||
@foreach ($languages as $language)
|
||||
<div class="input-group w-max-600">
|
||||
<span class="input-group-text wp-100">{{ $language['name'] }}</span>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_keywords]" class="form-control wp-400" placeholder="Meta title">{{ old('meta_keywords', $product->descriptions->keyBy('locale')[$language->code]->meta_keywords ?? '') }}</textarea>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_keywords]" class="form-control wp-400" placeholder="Meta keywords">{{ old('meta_keywords', $product->descriptions->keyBy('locale')[$language->code]->meta_keywords ?? '') }}</textarea>
|
||||
</div>
|
||||
@endforeach
|
||||
</x-admin::form.row>
|
||||
|
|
@ -342,7 +342,7 @@
|
|||
@foreach ($languages as $language)
|
||||
<div class="input-group w-max-600">
|
||||
<span class="input-group-text wp-100">{{ $language['name'] }}</span>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_description]" class="form-control wp-400" placeholder="Meta title">{{ old('meta_description', $product->descriptions->keyBy('locale')[$language->code]->meta_description ?? '') }}</textarea>
|
||||
<textarea rows="2" type="text" name="descriptions[{{ $language['code'] }}][meta_description]" class="form-control wp-400" placeholder="Meta description">{{ old('meta_description', $product->descriptions->keyBy('locale')[$language->code]->meta_description ?? '') }}</textarea>
|
||||
</div>
|
||||
@endforeach
|
||||
</x-admin::form.row>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $primary: #fd560f;
|
|||
$success: #71c20b;
|
||||
|
||||
$font-size-base: 0.8rem;
|
||||
$font-family-base: 'Poppins', sans-serif;
|
||||
$font-family-base: "Poppins","Helvetica","Arial","sans-serif";
|
||||
$border-radius: 0;
|
||||
$form-check-input-width: 1.2em;
|
||||
$form-check-input-border-radius: 0;
|
||||
|
|
|
|||
|
|
@ -24,27 +24,23 @@ body[class^="page-account-"] {
|
|||
font-display: swap;
|
||||
}
|
||||
|
||||
// @font-face {font-family: 'Poppins';
|
||||
// src: url('/fonts/poppins/Poppins-Medium.ttf') format("truetype");
|
||||
// font-style: normal;
|
||||
// font-display: swap;
|
||||
// font-weight: 700;
|
||||
// }
|
||||
|
||||
@font-face {font-family: 'Poppins';
|
||||
src: url('/fonts/poppins/Poppins-Medium.ttf') format("truetype");
|
||||
src: url('/fonts/poppins/Poppins-SemiBold.ttf') format("truetype");
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@font-face {font-family: 'Poppins';
|
||||
src: url('/fonts/poppins/Poppins-Bold.ttf') format("truetype");
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.fw-800 {
|
||||
font-weight: 800 !important;
|
||||
}
|
||||
|
||||
h1,h2,h3, h4, h5, h6, b, strong {
|
||||
font-weight: 800 !important;
|
||||
font-weight: 700;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
@for $i from 1 through 6 {
|
||||
|
|
@ -127,6 +123,7 @@ h1,h2,h3, h4, h5, h6, b, strong {
|
|||
font-weight: bold;
|
||||
position: relative;
|
||||
padding-bottom: 10px;
|
||||
color: #333;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
@media (max-width: 992px) {
|
||||
|
|
|
|||
|
|
@ -167,13 +167,14 @@ body.page-product {
|
|||
|
||||
.peoduct-info {
|
||||
.product-name {
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.4;
|
||||
font-size: 1.7rem;
|
||||
line-height: 1.3;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.rating-wrap {
|
||||
margin-bottom: 2rem;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="col-12 col-md-9 left-column">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body p-lg-4">
|
||||
<div class="p-lg-0"><h5 class="mb-3">{{ __('shop/carts.commodity') }}</h5></div>
|
||||
<div class="p-lg-0"><h4 class="mb-3">{{ __('shop/carts.commodity') }}</h4></div>
|
||||
<div class="cart-products-wrap table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
|
@ -81,14 +81,14 @@
|
|||
<div class="card shadow-sm fixed-top-line">
|
||||
<div class="card-body p-lg-4">
|
||||
<div class="card total-wrap">
|
||||
<div class="p-lg-0"><h5 class="mb-3">{{ __('shop/carts.product_total') }}</h5></div>
|
||||
<div class="p-lg-0"><h4 class="mb-3">{{ __('shop/carts.product_total') }}</h4></div>
|
||||
<div class="card-body p-lg-0">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item"><span>{{ __('shop/carts.all') }}</span><span>@{{ allProduct }}</span></li>
|
||||
<li class="list-group-item"><span>{{ __('shop/carts.selected') }}</span><span>@{{ total_quantity }}</span></li>
|
||||
<li class="list-group-item border-bottom-0"><span>{{ __('shop/carts.product_total') }}</span><span class="total-price">@{{ amount_format }}</span></li>
|
||||
<li class="list-group-item d-grid gap-2 mt-3 border-bottom-0">
|
||||
<button type="button" class="btn btn-primary fw-bold" @click="checkedBtnToCheckout">{{ __('shop/carts.to_checkout') }}</button>
|
||||
<button type="button" class="btn btn-primary fs-5 fw-bold" @click="checkedBtnToCheckout">{{ __('shop/carts.to_checkout') }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
@extends('layout.master')
|
||||
@section('body-class', 'page-categories')
|
||||
@section('title', system_setting('base.meta_title', 'BeikeShop开源好用的跨境电商系统 - BeikeShop官网') .' - '. $category->description->name)
|
||||
@section('title', $category->description->meta_title ?: system_setting('base.meta_title', 'BeikeShop开源好用的跨境电商系统 - BeikeShop官网') .' - '. $category->description->name)
|
||||
@section('keywords', $category->description->meta_keywords ?: system_setting('base.meta_keyword'))
|
||||
@section('description', $category->description->meta_description ?: system_setting('base.meta_description'))
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
@endforeach
|
||||
</ul>
|
||||
<div class="d-grid gap-2 mt-3">
|
||||
<button class="btn btn-primary fw-bold" type="button" id="submit-checkout">{{ __('shop/checkout.submit_order') }}</button>
|
||||
<button class="btn btn-primary fw-bold fs-5" type="button" id="submit-checkout">{{ __('shop/checkout.submit_order') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
@extends('layout.master')
|
||||
@section('body-class', 'page-product')
|
||||
@section('title', $product['name'])
|
||||
@section('title', $product['meta_title'] ?: $product['name'])
|
||||
@section('keywords', $product['meta_keywords'] ?: system_setting('base.meta_keyword'))
|
||||
@section('description', $product['meta_description'] ?: system_setting('base.meta_description'))
|
||||
|
||||
@push('header')
|
||||
<script src="{{ asset('vendor/vue/2.6.14/vue' . (!config('app.debug') ? '.min' : '') . '.js') }}"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue