diff --git a/beike/Admin/Repositories/PageRepo.php b/beike/Admin/Repositories/PageRepo.php
index a6c1fb98..0e8ed5bb 100644
--- a/beike/Admin/Repositories/PageRepo.php
+++ b/beike/Admin/Repositories/PageRepo.php
@@ -83,6 +83,8 @@ class PageRepo
$page->descriptions()->createMany($data['descriptions']);
$products = $data['products'] ?? [];
+ $page->pageProducts()->delete();
+
if ($products) {
$items = [];
foreach ($products as $item) {
@@ -90,7 +92,6 @@ class PageRepo
'product_id' => $item,
];
}
- $page->pageProducts()->delete();
$page->pageProducts()->createMany($items);
}
diff --git a/beike/Shop/Http/Controllers/PageController.php b/beike/Shop/Http/Controllers/PageController.php
index ae4aff2d..f43eecfd 100644
--- a/beike/Shop/Http/Controllers/PageController.php
+++ b/beike/Shop/Http/Controllers/PageController.php
@@ -32,10 +32,6 @@ class PageController extends Controller
$data = hook_filter('page.show.data', $data);
- if ($page->category) {
- return view('pages/article', $data);
- }
-
return view('pages/single', $data);
}
}
diff --git a/resources/beike/admin/views/pages/page_categories/index.blade.php b/resources/beike/admin/views/pages/page_categories/index.blade.php
index a4573add..d55b4653 100644
--- a/resources/beike/admin/views/pages/page_categories/index.blade.php
+++ b/resources/beike/admin/views/pages/page_categories/index.blade.php
@@ -32,7 +32,7 @@
{{ $item['id'] }} |
|
diff --git a/themes/default/pages/article.blade.php b/themes/default/pages/article.blade.php
deleted file mode 100644
index 6eb5ea15..00000000
--- a/themes/default/pages/article.blade.php
+++ /dev/null
@@ -1,108 +0,0 @@
-@extends('layout.master')
-@section('body-class', 'page-pages')
-@section('title', $page->description->meta_title ?: $page->description->title)
-@section('keywords', $page->description->meta_keywords)
-@section('description', $page->description->meta_description)
-
-@push('header')
-
-
-
-@endpush
-
-@section('content')
-
-
-
-
-
-
-
- {{ $page->description->title }}
-
- {{ __('page_category.author') }}: {{ $page->author }}
- {{ __('page_category.created_at') }}: {{ $page->created_at }}
- {{ __('page_category.views') }}: {{ $page->views }}
-
- {!! $page_format['content'] !!}
-
-
- @if ($products)
-
-
- {{ __('admin/product.product_relations') }}
-
-
-
- @foreach ($products as $item)
-
- @include('shared.product', ['product' => $item])
-
- @endforeach
-
-
-
-
-
-
-
-
- @endif
-
-
-
-
- @if ($page->category)
-
- @endif
-
-
-@endsection
-
-@push('add-scripts')
-
-@endpush
\ No newline at end of file
diff --git a/themes/default/pages/single.blade.php b/themes/default/pages/single.blade.php
index 75f91eb7..39ca7145 100644
--- a/themes/default/pages/single.blade.php
+++ b/themes/default/pages/single.blade.php
@@ -1,8 +1,8 @@
@extends('layout.master')
@section('body-class', 'page-pages')
-@section('title', $page['meta_title'] ?: $page['title'])
-@section('keywords', $page['meta_keywords'])
-@section('description', $page['meta_description'])
+@section('title', $page->description->meta_title ?: $page->description->title)
+@section('keywords', $page->description->meta_keywords)
+@section('description', $page->description->meta_description)
@section('content')
|