Compare commits

...

8 Commits

Author SHA1 Message Date
merelendor
f101f967ab zerof function logging on request error 2025-12-12 18:05:21 +03:00
merelendor
5844d1685d move API host to constaint defined in dbconn.php 2025-12-12 18:03:23 +03:00
merelendor
9535ba026c new announcement status on site 2025-11-06 06:24:40 +00:00
merelendor
6f925d54d3 move hostname to ENV in dbconn.php 2025-11-06 06:20:11 +00:00
merelendor
0a02c49841 udpates for components lang files 2025-11-06 06:01:25 +00:00
merelendor
843c442ae5 listing components redirect urls support 2025-09-22 07:06:09 +00:00
merelendor
a62b367eb1 Merge branch 'master' of https://github.com/merelendor/evoleasing-site 2025-09-08 08:35:04 +00:00
merelendor
b5c31ded7b disable Zerof requests for images on used cars 2025-09-04 12:18:46 +00:00
20 changed files with 314 additions and 38 deletions

View File

@ -224,6 +224,10 @@ function zerof_request($path, $query, $timeout = 900)
print "ZEROF response code ".$http_code."\n";
if($http_code != 200)
{
print curl_error($request);
print "\n";
print "\n";
print_r($response);
print "\n";

View File

@ -0,0 +1,4 @@
<?
$MESS ['DEFAULT_NAME'] = "Список внутренних баннеров";
$MESS ['DEFAULT_DESC'] = "Список внутренних баннеров";
?>

View File

@ -18,7 +18,7 @@ use Bitrix\Main\Context,
if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
{
$arResult = [];
$arResult['CALCULATION'] = (array) json_decode(file_get_contents("https://evoleasing.ru/api/calculation/"
$arResult['CALCULATION'] = (array) json_decode(file_get_contents("https://".HOSTNAME."/api/calculation/"
."?car_price=".$arParams['car_price']
."&initial_payment=".$arParams['initial_payment']
."&lease_period=".$arParams['lease_period']

View File

@ -36,7 +36,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
$arParams['car_price'] = $ar_res['PROPERTIES']['PRICE']['VALUE'];
$ar_res['CALCULATION'] = (array) json_decode(file_get_contents("https://evoleasing.ru/api/calculation/"
$ar_res['CALCULATION'] = (array) json_decode(file_get_contents("https://".HOSTNAME."/api/calculation/"
."?car_price=".$arParams['car_price']
."&initial_payment=".$arParams['initial_payment']
."&lease_period=".$arParams['lease_period']

View File

@ -0,0 +1,12 @@
<?
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die();
$arComponentDescription = [
'NAME' => GetMessage("COMPONENT_PERSONAL_DATA_NAME"),
'DESCRIPTION' => GetMessage("COMPONENT_PERSONAL_DATA_DESC"),
'PATH' => [
'ID' => 'evolution',
'NAME' => 'Evolution',
],
];
?>

View File

@ -1,4 +1,4 @@
<?
$MESS ['DEFAULT_NAME'] = "Политика обработки персональных данных";
$MESS ['DEFAULT_DESC'] = "Политика обработки персональных данных";
$MESS['COMPONENT_PERSONAL_DATA_NAME'] = "Политика обработки персональных данных";
$MESS['COMPONENT_PERSONAL_DATA_DESC'] = "Политика обработки персональных данных";
?>

View File

@ -1,8 +1,13 @@
<?
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
$arTemplateDescription = array(
"NAME" => GetMessage("DEFAULT_NAME"),
"DESCRIPTION" => GetMessage("DEFAULT_DESC"),
);
$arComponentDescription = [
'NAME' => GetMessage("COMPONENT_PREAPPROVAL_NAME"),
'DESCRIPTION' => GetMessage("COMPONENT_PREAPPROVAL_DESC"),
'PATH' => [
'ID' => 'evolution',
'NAME' => 'Evolution',
],
];
?>

View File

@ -1,4 +1,4 @@
<?
$MESS ['DEFAULT_NAME'] = "Предварительное одобрение";
$MESS ['DEFAULT_DESC'] = "Предварительное одобрение";
$MESS ['COMPONENT_PREAPPROVAL_NAME'] = "Предварительное одобрение";
$MESS ['COMPONENT_PREAPPROVAL_DESC'] = "Предварительное одобрение";
?>

View File

@ -18,7 +18,7 @@ $this->setFrameMode(true);
<div class="services_list">
<? foreach($arResult['ITEMS'] AS $service): ?>
<div class="service_item">
<a href="<?= $service['DETAIL_PAGE_URL']; ?>">
<a href="<?= !empty($service['PROPERTIES']['REDIRECT_URL']['VALUE']) ? $service['PROPERTIES']['REDIRECT_URL']['VALUE'] : $service['DETAIL_PAGE_URL']; ?>">
<span class="service_name"><?= $service['NAME']; ?></span>
<span class="program_link">Подробнее</span>
<img src="<?= $service['PREVIEW_PICTURE']; ?>" alt="<?= $service['NAME']; ?>" />

View File

@ -33,7 +33,7 @@ $this->setFrameMode(true);
<div class="special_list">
<? foreach($arResult['ITEMS'] AS $offer): ?>
<div class="special_item">
<a href="<?= $offer['DETAIL_PAGE_URL']; ?>">
<a href="<?= !empty($offer['PROPERTIES']['REDIRECT_URL']['VALUE']) ? $offer['PROPERTIES']['REDIRECT_URL']['VALUE'] : $offer['DETAIL_PAGE_URL']; ?>">
<span class="special_name"><?= $offer['NAME']; ?></span>
<img src="<?= $offer['PREVIEW_PICTURE']; ?>" alt="<?= $offer['NAME']; ?>"/>
<? if(!isset($_GET['advertise']) && $offer['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>

View File

@ -100,15 +100,17 @@ $this->setFrameMode(true);
</div>
<?/* style="display:none;" */?>
<div class="scroll_images_wrapper">
<div class="scroll_images_button scroll_images_button_left"></div>
<div class="scroll_images" data-custom-scroll="true">
<? foreach($arResult['PHOTOS_120'] AS $k => $thumb): ?>
<div class="thumb" data-p480="<?= $arResult['PHOTOS_480'][$k]; ?>" data-p1080="<?= $arResult['PHOTOS_1080'][$k]; ?>" data-index="<?= $k; ?>">
<img class="thumb_image" src="<?= $thumb; ?>" alt="<?= $arResult['NAME']; ?>">
</div>
<? endforeach; ?>
</div>
<div class="scroll_images_button scroll_images_button_right"></div>
<? if(count($arResult['PHOTOS_120']) > 0): ?>
<div class="scroll_images_button scroll_images_button_left"></div>
<div class="scroll_images" data-custom-scroll="true">
<? foreach($arResult['PHOTOS_120'] AS $k => $thumb): ?>
<div class="thumb" data-p480="<?= $arResult['PHOTOS_480'][$k]; ?>" data-p1080="<?= $arResult['PHOTOS_1080'][$k]; ?>" data-index="<?= $k; ?>">
<img class="thumb_image" src="<?= $thumb; ?>" alt="<?= $arResult['NAME']; ?>">
</div>
<? endforeach; ?>
</div>
<div class="scroll_images_button scroll_images_button_right"></div>
<? endif; ?>
</div>
</div>
<div class="col">

View File

@ -226,7 +226,7 @@ print_r($bitrix_modifications);
$c = 0;
foreach($json AS $car)
{
$modification_content = file_get_contents("https://web-api.evoleasing.ru:8443/site/Vehicle/GetCatalog?id=". $car['uid'] ."", false, stream_context_create($arrContextOptions));
$modification_content = file_get_contents(API_HOST."/site/Vehicle/GetCatalog?id=". $car['uid'] ."", false, stream_context_create($arrContextOptions));
$modification_json = json_decode($modification_content, true);
$name = "".$car['brand']['name']." ".$car['model']['name']." ".$car['modification']."";

View File

@ -2,9 +2,11 @@
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?= GTM_SITE_KEY; ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<? global $USER; ?>
<header class="page_header <?= $USER->IsAuthorized() ? "header_with_offset" : ""; ?>">
<? $APPLICATION->IncludeComponent("bitrix:menu", "evolution", Array(
"ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно
<header class="page_header page_header_announce <?= $USER->IsAuthorized() ? "header_with_offset" : ""; ?>">
<? $APPLICATION->IncludeComponent("bitrix:menu",
"evolution",
Array(
"ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно
"CHILD_MENU_TYPE" => "left", // Тип меню для остальных уровней
"DELAY" => "N", // Откладывать выполнение шаблона меню
"MAX_LEVEL" => "1", // Уровень вложенности меню
@ -16,10 +18,11 @@
"MENU_CACHE_USE_GROUPS" => "Y", // Учитывать права доступа
"ROOT_MENU_TYPE" => "top", // Тип меню для первого уровня
"USE_EXT" => "N", // Подключать файлы с именами вида .тип_меню.menu_ext.php
"ANNOUNCE_BUTTON_URL" => "https://www.evoleasing.ru/about/news/protsess-reorganizatsii/"
),
false
); ?>
</header>
<main class="<?= $USER->IsAuthorized() ? "content_with_offset" : ""; ?>">
<main class="<?= $USER->IsAuthorized() ? "content_with_offset content_with_offset_announce" : ""; ?>">
<!--<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">-->
<? $APPLICATION->ShowPanel(); ?>

View File

@ -0,0 +1,60 @@
$(function()
{
var w = 1310;
if(window.innerWidth >= 1360 && window.innerWidth <= 1420)
{
w = 1200;
}
if(window.innerWidth >= 1280 && window.innerWidth < 1360)
{
w = 1130;
}
var announce_panel_offset = (window.innerWidth - w) / 2;
console.log("window", announce_panel_offset, w);
if(window.innerWidth > 1279)
{
$("#main_menu_announce").css("margin-left", '-'+announce_panel_offset+'px');
$("#main_menu_announce").css("margin-right", '-'+announce_panel_offset+'px');
$("#main_menu_announce_content").css("margin-left", announce_panel_offset+'px');
$("#main_menu_announce_content").css("margin-right", announce_panel_offset+'px');
}
else
{
$("#main_menu_announce").css("margin-left", '0px');
$("#main_menu_announce").css("margin-right", '0px');
$("#main_menu_announce_content").css("margin-left", '0px');
$("#main_menu_announce_content").css("margin-right", '0px');
}
$(window).on("resize", function()
{
var w = 1310;
if(window.innerWidth >= 1360 && window.innerWidth <= 1420)
{
w = 1200;
}
if(window.innerWidth >= 1280 && window.innerWidth < 1360)
{
w = 1130;
}
var announce_panel_offset = (window.innerWidth - w) / 2;
console.log("window", announce_panel_offset, w);
if(window.innerWidth > 1279)
{
$("#main_menu_announce").css("margin-left", '-'+announce_panel_offset+'px');
$("#main_menu_announce").css("margin-right", '-'+announce_panel_offset+'px');
$("#main_menu_announce_content").css("margin-left", announce_panel_offset+'px');
$("#main_menu_announce_content").css("margin-right", announce_panel_offset+'px');
//console.log("window", window.innerWidth);
}
else
{
$("#main_menu_announce").css("margin-left", '0px');
$("#main_menu_announce").css("margin-right", '0px');
$("#main_menu_announce_content").css("margin-left", '0px');
$("#main_menu_announce_content").css("margin-right", '0px');
}
});
});

View File

@ -0,0 +1,158 @@
.page_header_announce {
height: 182px !important;
@media all and (min-width: 1420px) and (max-width: 1600px) {
height: 163px !important;
}
@media all and (min-width: 1280px) and (max-width: 1420px) {
height: 163px !important;
}
@media all and (min-width: 769px) and (max-width: 1279px) {
height: 135px !important;
}
@media all and (min-width: 768px) and (max-width: 768px) {
height: 84px !important;
}
@media all and (max-width: 767px) {
height: 153px !important;
}
}
.page_header_announce_container {
padding: 0px 0 105px 0 !important;
@media all and (min-width: 1420px) and (max-width: 1600px) {
padding: 0px 0 100px 0 !important;
}
@media all and (min-width: 1280px) and (max-width: 1420px) {
padding: 0px 0 100px 0 !important;
}
@media all and (min-width: 769px) and (max-width: 1279px) {
padding: 0px 0 50px 0 !important;
}
@media all and (min-width: 768px) and (max-width: 768px) {
padding: 0px 0 35px 0 !important;
}
@media all and (max-width: 767px) {
padding: 0px 0 35px 0 !important;
height: 85px !important;
}
}
#main_menu_announce {
background-color: #04A8A4;
margin-top: 0px;
margin-bottom: 10px;
height: 60px;
@media all and (max-width: 1279px) {
position: absolute;
}
@media all and (min-width: 769px) and (max-width: 1279px) {
position: absolute;
top: 45px;
left: -275px;
right: -180px;
padding-left: 80px;
padding-right: 80px;
}
@media all and (min-width: 768px) and (max-width: 768px) {
position: absolute;
top: 32px;
left: -80px;
right: -80px;
padding-left: 80px;
padding-right: 80px;
}
@media all and (max-width: 767px) {
top: 40px;
left: -80px;
right: -80px;
padding-left: 80px;
padding-right: 80px;
}
}
#main_menu_announce_content {
display: flex;
flex-direction: row;
align-items: center;
color: #fff;
font-weight: 300;
font-size: 22px;
height: 100%;
justify-content: space-between;
@media all and (min-width: 1280px) and (max-width: 1420px) {
font-size: 21px;
line-height: 19px;
}
@media all and (min-width: 900px) and (max-width: 1279px) {
font-size: 20px;
line-height: 19px;
}
@media all and (min-width: 769px) and (max-width: 900px) {
font-size: 19px;
line-height: 19px;
}
@media all and (min-width: 768px) and (max-width: 768px) {
font-size: 17px;
line-height: 19px;
}
@media all and (min-width: 580px) and (max-width: 767px) {
font-size: 16px;
line-height: 18px;
}
@media all and (min-width: 440px) and (max-width: 579px) {
font-size: 14px;
line-height: 16px;
}
@media all and (max-width: 439px) {
font-size: 12px;
line-height: 13px;
}
}
#main_menu_announce_content_text {
padding-right: 12px;
}
.content_with_offset_announce {
padding-top: 222px !important;
@media all and (min-width: 1280px) and (max-width: 1600px) {
padding-top: 202px !important;
}
@media all and (min-width: 769px) and (max-width: 1279px) {
padding-top: 175px !important;
}
@media all and (min-width: 768px) and (max-width: 768px) {
padding-top: 183px !important;
}
@media all and (max-width: 767px) {
padding-top: 192px !important;
}
}

View File

@ -1,6 +1,6 @@
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="container">
<div class="container page_header_announce_container">
<a href="/" class="logo">
<img src="/images/logo.svg" alt="" width="217px" height="32px" />
</a>
@ -15,6 +15,14 @@
</form>
</div>
<nav>
<div id="main_menu_announce">
<div id="main_menu_announce_content">
<div id="main_menu_announce_content_text">Больше преимуществ, больше возможностей: мы присоединяемся к «Совкомбанк Лизинг»</div>
<a class="button" style="width:110px; display: flex; justify-content: center;" href="<?= $arParams["ANNOUNCE_BUTTON_URL"]; ?>">
<span id="send_button_text" style="display:block;">Подробнее</span>
</a>
</div>
</div>
<?
$selected = "Главная";
foreach($arResult as $arItem)

View File

@ -7,16 +7,26 @@
}
main {
overflow-x: hidden;
padding-top: 112px;
padding-top: 182px !important;
}
@media all and (max-width: 1600px) and (min-width: 1280px) {
@media all and (min-width: 1280px) and (max-width: 1600px) {
main {
padding-top: 98px;
padding-top: 163px !important;
}
}
@media all and (max-width: 1279px) {
@media all and (min-width: 769px) and (max-width: 1279px) {
main {
padding-top: 86px;
padding-top: 136px !important;
}
}
@media all and (min-width: 768px) and (max-width: 768px) {
main {
padding-top: 144px !important;
}
}
@media all and (max-width: 767px) {
main {
padding-top: 153px !important;
}
}
main section.gray {

View File

@ -7,17 +7,25 @@
}
main {
overflow-x: hidden;
padding-top: 112px;
overflow-x: hidden;
//padding-top: 112px;
padding-top: 182px !important;
@media all and (max-width: 1600px) and (min-width: 1280px) {
padding-top: 98px;
@media all and (min-width: 1280px) and (max-width: 1600px) {
padding-top: 163px !important;
}
@media all and (max-width: 1279px) {
padding-top: 86px;
@media all and (min-width: 769px) and (max-width: 1279px) {
padding-top: 136px !important;
}
@media all and (min-width: 768px) and (max-width: 768px) {
padding-top: 144px !important;
}
@media all and (max-width: 767px) {
padding-top: 153px !important;
}
section {
//padding: 80px 0;

View File

@ -367,6 +367,7 @@ function set_images($code, $car_id, $delete = false, $properties = [])
}
}
/*
$images = zerof_get_images($code);
if(count($images) > 0)
@ -400,6 +401,7 @@ function set_images($code, $car_id, $delete = false, $properties = [])
}
print "set_images END\n";
*/
return;
}