From a235ed25ac6c248c8c169ba8de74543131e2d509 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Fri, 8 Oct 2021 16:33:38 +1000 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B2=20=D1=82=D0=BE=D0=B2=D0=B0=D1=80=D0=B5=20+=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D1=83=D0=B2=D0=B5?= =?UTF-8?q?=D0=B4=D0=BE=D0=BC=D0=BB=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B5=D0=B0=D1=83=D1=82=D0=B5=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D1=84=D0=B8=D1=86=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=81=D0=B5=D1=81=D1=81=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mirzaev/skillparts/system/models/Product.php | 2 +- mirzaev/skillparts/system/web/js/notification.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mirzaev/skillparts/system/models/Product.php b/mirzaev/skillparts/system/models/Product.php index 2d83270..36d5de7 100644 --- a/mirzaev/skillparts/system/models/Product.php +++ b/mirzaev/skillparts/system/models/Product.php @@ -600,6 +600,6 @@ class Product extends Document $analogs = ProductEdgeProduct::searchConnections(self::searchByCatn($catn)->_key, $limit); - return ; + return []; } } diff --git a/mirzaev/skillparts/system/web/js/notification.js b/mirzaev/skillparts/system/web/js/notification.js index db6187d..bc3556f 100644 --- a/mirzaev/skillparts/system/web/js/notification.js +++ b/mirzaev/skillparts/system/web/js/notification.js @@ -8,14 +8,20 @@ function notification_last() { 'last': 1 }, success: notification_response_success, - error: notification_response_error + error: notification_response_error, + statusCode: { + 403: function () { + // Отмена отправки запросов чтения всплывающих уведомлений + clearInterval(notificationsInterval); + } + } }); return false; }; // Проверка уведомлений -setInterval(notification_last, 3000); +let notificationsInterval = setInterval(notification_last, 3000); function notification_popup_create(html, id) { // Инициализация