From b18fdfbaf2492a17d723aeb640b449ae3de5da5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Thu, 16 Mar 2023 19:57:02 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20js=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BF=D0=BE=D0=B2=D0=BE=D0=B4=D1=83=20=D0=BA=D0=B0=D1=80?= =?UTF-8?q?=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/MainController.php | 6 +- public/js/main.js | 6 +- resources/views/mapsobj.blade.php | 155 +++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 37ac93b..ba86d32 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -270,7 +270,11 @@ class MainController extends Controller * Избранное */ public function Favorite(Request $request) { - $Arr = json_decode($_COOKIE['favorite_house'], true); + if (empty($_COOKIE['favorite_house'])) { + $Arr = Array(); + } else { + $Arr = json_decode($_COOKIE['favorite_house'], true); + } if (!empty($Arr) && is_array($Arr)) { $houses = House::with('areas')->whereIn('id', $Arr); diff --git a/public/js/main.js b/public/js/main.js index f5be49d..25fc888 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -29,7 +29,7 @@ class App { this.sendForm('.js_popup_sending_form_', '[data-popup="success"]'); //this.sendOffer(); //отправка предложения по e-mail; - this.setGeneralMap(); // карта на странице карт; + //this.setGeneralMap(); // карта на странице карт; this.setComplexMap('complex-map', [55.726591050908745, 37.57244549999999], 'ЖК Садовые кварталы'); // карта на странице 'ЖК'; this.setComplexMap('offer-map', [55.70851106903402, 37.65864349999999], 'Аренда торгового помещения 321,6 м2'); // карта на странице 'Предложение'; this.setCatalogSorts(); // сортировка на странице 'каталог'; @@ -1206,7 +1206,7 @@ class App { // карта на странице карт; setGeneralMap() { - +/* if (document.querySelector('#general-map')) { ymaps.ready(init); // Дождёмся загрузки API и готовности DOM; @@ -1358,7 +1358,7 @@ class App { } }; - +*/ // аккордеон в футере setFooterSpoilers() { diff --git a/resources/views/mapsobj.blade.php b/resources/views/mapsobj.blade.php index b0a5256..fecb78c 100644 --- a/resources/views/mapsobj.blade.php +++ b/resources/views/mapsobj.blade.php @@ -6,6 +6,161 @@ @section('custom_js') @include('js.filter_value') + @endsection @section('content') -- 1.7.10.4