修复首页编辑器模块问题
This commit is contained in:
parent
657f4d67bb
commit
07111c8396
|
|
@ -157,9 +157,7 @@ class DesignService
|
||||||
|
|
||||||
$type = $link['type'] ?? '';
|
$type = $link['type'] ?? '';
|
||||||
$value = (int)$link['value'] ?? 0;
|
$value = (int)$link['value'] ?? 0;
|
||||||
if ($type && $value) {
|
$images[$index]['link']['link'] = self::handleLink($type, $value);
|
||||||
$images[$index]['link']['link'] = self::handleLink($type, $value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $images;
|
return $images;
|
||||||
|
|
@ -175,12 +173,14 @@ class DesignService
|
||||||
*/
|
*/
|
||||||
private static function handleLink($type, $value): string
|
private static function handleLink($type, $value): string
|
||||||
{
|
{
|
||||||
if ($type == 'product') {
|
if ($type == 'product' && $value) {
|
||||||
return shop_route('products.show', ['product' => $value]);
|
return shop_route('products.show', ['product' => $value]);
|
||||||
}
|
}
|
||||||
if ($type == 'category') {
|
|
||||||
|
if ($type == 'category' && $value) {
|
||||||
return shop_route('categories.show', ['category' => $value]);
|
return shop_route('categories.show', ['category' => $value]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -582,6 +582,9 @@ footer {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
margin-top: 5rem;
|
margin-top: 5rem;
|
||||||
}
|
}
|
||||||
|
footer .footer-active {
|
||||||
|
outline: 2px dashed #4bb1f0 !important;
|
||||||
|
}
|
||||||
footer .services-wrap {
|
footer .services-wrap {
|
||||||
padding: 2.2rem 0;
|
padding: 2.2rem 0;
|
||||||
border-bottom: 1px solid #e4e4e4;
|
border-bottom: 1px solid #e4e4e4;
|
||||||
|
|
|
||||||
|
|
@ -232,11 +232,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
footerItemChange(val) {
|
footerItemChange(val) {
|
||||||
console.log(val)
|
// console.log(val)
|
||||||
// $footer = $("#preview-iframe").contents().find('footer');
|
$footer = $("#preview-iframe").contents().find('footer');
|
||||||
// $footer.find("div").removeClass('footer-active');
|
$footer.find("div").removeClass('footer-active');
|
||||||
// if (!val) return;
|
if (!val) return;
|
||||||
// $footer.find(`.${val}`).addClass('footer-active');
|
$footer.find(`.${val}`).addClass('footer-active');
|
||||||
},
|
},
|
||||||
|
|
||||||
// 编辑模块
|
// 编辑模块
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ setTimeout(() => {
|
||||||
full: true,
|
full: true,
|
||||||
images: [
|
images: [
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/banner-2.png'),
|
image: languagesFill('catalog/demo/banner-2.png'),
|
||||||
show: true,
|
show: true,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ setTimeout(() => {
|
||||||
floor: languagesFill(''),
|
floor: languagesFill(''),
|
||||||
images: [
|
images: [
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/image_plus_1.png'),
|
image: languagesFill('catalog/demo/image_plus_1.png'),
|
||||||
show: true,
|
show: true,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
@ -73,7 +73,7 @@ setTimeout(() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/image_plus_2.png'),
|
image: languagesFill('catalog/demo/image_plus_2.png'),
|
||||||
show: false,
|
show: false,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
@ -81,7 +81,7 @@ setTimeout(() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/image_plus_3.png'),
|
image: languagesFill('catalog/demo/image_plus_3.png'),
|
||||||
show: false,
|
show: false,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
@ -89,7 +89,7 @@ setTimeout(() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/image_plus_4.png'),
|
image: languagesFill('catalog/demo/image_plus_4.png'),
|
||||||
show: false,
|
show: false,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ setTimeout(() => {
|
||||||
floor: languagesFill(''),
|
floor: languagesFill(''),
|
||||||
images: [
|
images: [
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/banner.png'),
|
image: languagesFill('catalog/demo/banner.png'),
|
||||||
show: true,
|
show: true,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
@ -110,7 +110,7 @@ setTimeout(() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: languagesFill('/demo/banner.png'),
|
image: languagesFill('catalog/demo/banner.png'),
|
||||||
show: false,
|
show: false,
|
||||||
link: {
|
link: {
|
||||||
type: 'product',
|
type: 'product',
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
@can('orders_update_status')
|
@can('orders_update_status')
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<div class="card-header"><h6 class="card-title">状态</h6></div>
|
<div class="card-header"><h6 class="card-title">订单状态</h6></div>
|
||||||
<div class="card-body" id="app">
|
<div class="card-body" id="app">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="当前状态">
|
<el-form-item label="当前状态">
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
@foreach ($admin_languages as $language)
|
@foreach ($admin_languages as $language)
|
||||||
<div class="tab-pane fade {{ $loop->first ? 'show active' : '' }}" id="tab-{{ $language['code'] }}">
|
<div class="tab-pane fade {{ $loop->first ? 'show active' : '' }}" id="tab-{{ $language['code'] }}">
|
||||||
<x-admin-form-input name="descriptions[{{ $language['code'] }}][title]" title="信息标题" value="{{ old('title', '') }}" />
|
<x-admin-form-input name="descriptions[{{ $language['code'] }}][title]" title="信息标题" value="{{ old('title', $page->descriptions[$language['code']]->name ?? '') }}" />
|
||||||
<x-admin::form.row title="内容">
|
<x-admin::form.row title="内容">
|
||||||
<div class="w-max-1000">
|
<div class="w-max-1000">
|
||||||
<textarea name="descriptions[{{ $language['code'] }}][content]" data-tinymce-height="600" class="form-control tinymce">
|
<textarea name="descriptions[{{ $language['code'] }}][content]" data-tinymce-height="600" class="form-control tinymce">
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ footer {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
margin-top: 5rem;
|
margin-top: 5rem;
|
||||||
|
|
||||||
|
.footer-active {
|
||||||
|
outline: 2px dashed #4bb1f0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.services-wrap {
|
.services-wrap {
|
||||||
padding: 2.2rem 0;
|
padding: 2.2rem 0;
|
||||||
border-bottom: 1px solid #e4e4e4;
|
border-bottom: 1px solid #e4e4e4;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-sm">
|
<div class="col-6 col-sm">
|
||||||
<h6 class="text-uppercase text-dark mb-3">Hot links</h6>
|
<h6 class="text-uppercase text-dark mb-3">联系我们</h6>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li><a href="">dsddslkdjccxz</a></li>
|
<li><a href="">dsddslkdjccxz</a></li>
|
||||||
<li><a href="">dsddslkdjccxz</a></li>
|
<li><a href="">dsddslkdjccxz</a></li>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue