Merge branch 'master' of https://github.com/merelendor/evoleasing-site
@ -1,5 +1,7 @@
|
||||
Options -Indexes
|
||||
ErrorDocument 404 /404.php
|
||||
ErrorDocument 500 /500.html
|
||||
ErrorDocument 502 /500.html
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
php_flag allow_call_time_pass_reference 1
|
||||
|
||||
37
500.html
@ -29,31 +29,22 @@
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="/favicon/favicon_152.png" />
|
||||
<meta property="og:description" content="" />
|
||||
|
||||
<meta name="theme-color" content="#1C01A9" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<section style="margin: 80px 0;">
|
||||
<div class="container">
|
||||
<div class="error_page">
|
||||
<div>
|
||||
<h1>502</h1>
|
||||
<p>Извините, возникла техническая проблема, свяжитесь с нами по телефона <a
|
||||
href="tel:8 8001112233">8 800 111 22 33</a></p>
|
||||
</div>
|
||||
<img src="/images/404.jpg" alt="502" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
||||
<script
|
||||
type="text/javascript">var _ba = _ba || []; _ba.push(["aid", "795284ccab80fb65bbd8aaf8a1472462"]); _ba.push(["host", "185.46.8.240"]); (function () { var ba = document.createElement("script"); ba.type = "text/javascript"; ba.async = true; ba.src = (document.location.protocol == "https:" ? "https://" : "http://") + "bitrix.info/ba.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ba, s); })();</script>
|
||||
|
||||
|
||||
<main>
|
||||
<section style="margin: 80px 0;">
|
||||
<div class="container">
|
||||
<div class="error_page">
|
||||
<div>
|
||||
<h1>502</h1>
|
||||
<p>Извините, возникла техническая проблема, свяжитесь с нами по телефона <a href="tel:8 8001112233">8 800 111 22 33</a></p>
|
||||
</div>
|
||||
<img src="/images/404.jpg" alt="502" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script type="text/javascript">var _ba = _ba || []; _ba.push(["aid", "795284ccab80fb65bbd8aaf8a1472462"]); _ba.push(["host", "185.46.8.240"]); (function () { var ba = document.createElement("script"); ba.type = "text/javascript"; ba.async = true; ba.src = (document.location.protocol == "https:" ? "https://" : "http://") + "bitrix.info/ba.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ba, s); })();</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -2511,7 +2511,7 @@ switch($PARAM_1)
|
||||
break;
|
||||
|
||||
case "calculation":
|
||||
{
|
||||
{
|
||||
$payload = json_encode([
|
||||
"car_price" => $REQ['car_price'],
|
||||
"initial_payment" => $REQ['initial_payment'],
|
||||
|
||||
BIN
apple-touch-icon-120x120-precomposed copy.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
apple-touch-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
apple-touch-icon-precomposed.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
favicon/favicon_120.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
favicon/favicon_144.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
favicon/favicon_152.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
favicon/favicon_16.png
Normal file
|
After Width: | Height: | Size: 504 B |
BIN
favicon/favicon_32.png
Normal file
|
After Width: | Height: | Size: 852 B |
BIN
favicon/favicon_57.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
favicon/favicon_64.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
favicon/favicon_72.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 2.1 KiB |
@ -16,7 +16,7 @@ $this->setFrameMode(true);
|
||||
<div class="container">
|
||||
<h1 class="section_title"><?= $arResult['NAME']; ?></h1>
|
||||
<div class="vacancy">
|
||||
<? if(count($arResult['PROPERTIES']['REGION']['RELATED']) > 0): ?>
|
||||
<? if(!is_null($arResult['PROPERTIES']['REGION']['RELATED']) && count($arResult['PROPERTIES']['REGION']['RELATED']) > 0): ?>
|
||||
<p><strong>Регион:</strong>
|
||||
<? $c = 0; foreach($arResult['PROPERTIES']['REGION']['RELATED'] AS $region): ?>
|
||||
<?= $region['NAME']; ?>
|
||||
|
||||
@ -17,12 +17,29 @@ use Bitrix\Main\Context,
|
||||
|
||||
if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
{
|
||||
$payload = json_encode([
|
||||
"car_price" => $arParams['car_price'],
|
||||
"initial_payment" => $arParams['initial_payment'],
|
||||
"lease_period" => $arParams['lease_period'],
|
||||
"redemption_payment" => $arParams['redemption_payment'],
|
||||
]);
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, API_HOST."/calculator/");
|
||||
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($c, CURLOPT_POST, 1);
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $payload);
|
||||
curl_setopt($c, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
|
||||
|
||||
$response = curl_exec($c) or die(curl_error($c));
|
||||
curl_close($c);
|
||||
|
||||
$arResult = [];
|
||||
$arResult['CALCULATION'] = (array) json_decode(file_get_contents("https://evoleasing.ru/api/calculation/"
|
||||
."?car_price=".$arParams['car_price']
|
||||
."&initial_payment=".$arParams['initial_payment']
|
||||
."&lease_period=".$arParams['lease_period']
|
||||
."&redemption_payment=".$arParams['redemption_payment'].""));
|
||||
$arResult['CALCULATION'] = (array) json_decode($response);
|
||||
|
||||
$this->IncludeComponentTemplate();
|
||||
}
|
||||
@ -15,7 +15,7 @@ $this->setFrameMode(true);
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
calculator(<?= CUtil::PhpToJSObject(array_merge($arParams, $arResult['CALCULATION'])); ?>);
|
||||
calculator(<?= CUtil::PhpToJSObject(array_merge(gettype($arParams) === "array" ? $arParams : [], gettype($arResult['CALCULATION']) === "array" ? $arResult['CALCULATION'] : [] )); ?>);
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@ -35,7 +35,7 @@ $this->setFrameMode(true);
|
||||
<?= isset($arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT']) ? $arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT'] : ""; ?>
|
||||
</div>
|
||||
<div class="leasing_offer">
|
||||
<? if(count($arResult['PROPERTIES']['CARS']['RELATED']) > 0): ?>
|
||||
<? if(!is_null($arResult['PROPERTIES']['CARS']['RELATED']) && count($arResult['PROPERTIES']['CARS']['RELATED']) > 0): ?>
|
||||
<div class="title_wrapper">
|
||||
<div class="left">
|
||||
<h3>Лизинговые предложения</h3>
|
||||
@ -55,43 +55,47 @@ $this->setFrameMode(true);
|
||||
</div>
|
||||
<div id="leasing_slider">
|
||||
<div class="leasing_list swiped">
|
||||
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
|
||||
<? $car = $arResult['PROPERTIES']['CARS']['RELATED'][$i]; ?>
|
||||
<div class="leasing_item">
|
||||
<a class="item_wrapper car_top_card" data-id="<?= $i; ?>" style="cursor: pointer;">
|
||||
<img src="<?= $car['PREVIEW_PICTURE']; ?>" alt="<?= $car['NAME']; ?>" />
|
||||
<span class="leasing_model"><?= $car['NAME']; ?></span>
|
||||
<span class="leasing_desc"><?= $car['PROPERTIES']['TAGLINE']['VALUE']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<? endfor; ?>
|
||||
<? if(is_array($arResult['PROPERTIES']['CARS']['RELATED'])): ?>
|
||||
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
|
||||
<? $car = $arResult['PROPERTIES']['CARS']['RELATED'][$i]; ?>
|
||||
<div class="leasing_item">
|
||||
<a class="item_wrapper car_top_card" data-id="<?= $i; ?>" style="cursor: pointer;">
|
||||
<img src="<?= $car['PREVIEW_PICTURE']; ?>" alt="<?= $car['NAME']; ?>" />
|
||||
<span class="leasing_model"><?= $car['NAME']; ?></span>
|
||||
<span class="leasing_desc"><?= $car['PROPERTIES']['TAGLINE']['VALUE']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<? endfor; ?>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<a id="leasing_offer_car"></a>
|
||||
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
|
||||
<div class="leasing_offer-detail car_top_description car_top_description_<?= $i; ?>" style="display: <?= $i == 0 ? "flex" : "none"; ?>;">
|
||||
<div id="single_slider" class="image_slider">
|
||||
<div class="slider_list">
|
||||
<? foreach($arResult['PROPERTIES']['CARS']['RELATED'][$i]['PROPERTIES']['PHOTOS']['VALUE'] AS $photo_url): ?>
|
||||
<div class="slide">
|
||||
<img src="<?= $photo_url; ?>" alt="<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?>" />
|
||||
<? if(is_array($arResult['PROPERTIES']['CARS']['RELATED'])): ?>
|
||||
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
|
||||
<div class="leasing_offer-detail car_top_description car_top_description_<?= $i; ?>" style="display: <?= $i == 0 ? "flex" : "none"; ?>;">
|
||||
<div id="single_slider" class="image_slider">
|
||||
<div class="slider_list">
|
||||
<? foreach($arResult['PROPERTIES']['CARS']['RELATED'][$i]['PROPERTIES']['PHOTOS']['VALUE'] AS $photo_url): ?>
|
||||
<div class="slide">
|
||||
<img src="<?= $photo_url; ?>" alt="<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?>" />
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
<div class="slider_dots">
|
||||
<script type="text/template" id="embla-dot-template">
|
||||
<button class="embla__dot" type="button"></button>
|
||||
</script>
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
<div class="slider_dots">
|
||||
<script type="text/template" id="embla-dot-template">
|
||||
<button class="embla__dot" type="button"></button>
|
||||
</script>
|
||||
<div class="offer_desc">
|
||||
<p class="offer_name"><?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?></p>
|
||||
<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['PREVIEW_TEXT']; ?>
|
||||
<a href="#order" class="button button-blue">Отправить заявку</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="offer_desc">
|
||||
<p class="offer_name"><?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?></p>
|
||||
<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['PREVIEW_TEXT']; ?>
|
||||
<a href="#order" class="button button-blue">Отправить заявку</a>
|
||||
</div>
|
||||
</div>
|
||||
<? endfor; ?>
|
||||
<? endfor; ?>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<div class="aside_container">
|
||||
<article>
|
||||
|
||||
@ -36,8 +36,8 @@ IncludeTemplateLangFile(__FILE__);
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon-16.png" sizes="16x16" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon-32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon_16.png" sizes="16x16" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon_32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon_96.png" sizes="96x96" />
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/favicon_57.png" />
|
||||
|
||||
@ -32,8 +32,8 @@ IncludeTemplateLangFile(__FILE__);
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
||||
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon-16.png" sizes="16x16" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon-32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon_16.png" sizes="16x16" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon_32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="/favicon/favicon_96.png" sizes="96x96" />
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/favicon_57.png" />
|
||||
|
||||