fix: pc/mobile banner的extra_image取值
This commit is contained in:
@@ -45,14 +45,7 @@ class ContactUs extends Common
|
|||||||
$banner_map[$v->unique_label] = $v;
|
$banner_map[$v->unique_label] = $v;
|
||||||
}
|
}
|
||||||
$focus_image = data_get($banner_map, 'BANNER_6805e3d32dcc2')?->items->first()?->toArray();
|
$focus_image = data_get($banner_map, 'BANNER_6805e3d32dcc2')?->items->first()?->toArray();
|
||||||
$info_datas = data_get($banner_map, 'BANNER_6806090c1838f')?->items->each(function($item) {
|
$info_datas = data_get($banner_map, 'BANNER_6806090c1838f')?->items->toArray();
|
||||||
if (Str::contains($item->title, '<br/>')) {
|
|
||||||
$title = explode('<br/>', $item->title);
|
|
||||||
$item->title = $title[0];
|
|
||||||
$item->title_short = $title[1];
|
|
||||||
}
|
|
||||||
return $item;
|
|
||||||
})->toArray();
|
|
||||||
}
|
}
|
||||||
View::assign('focus_image', $focus_image);
|
View::assign('focus_image', $focus_image);
|
||||||
View::assign('info_datas', $info_datas);
|
View::assign('info_datas', $info_datas);
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
<div class="narskfit" {notempty name="item.link"}onclick="location.href='{$item.link}'"{/notempty}>
|
<div class="narskfit" {notempty name="item.link"}onclick="location.href='{$item.link}'"{/notempty}>
|
||||||
<img src="{$item.image}" class="narskico-img" />
|
<img src="{$item.image}" class="narskico-img" />
|
||||||
<span class="narskf-title">{$item.title}</span>
|
<span class="narskf-title">{$item.title}</span>
|
||||||
{notempty name="item.title_short"}
|
|
||||||
<span class="narskf-sm">{$item.title_short}</span>
|
|
||||||
{/notempty}
|
|
||||||
{notempty name="item.desc"}
|
{notempty name="item.desc"}
|
||||||
{if condition="str_contains($item.desc, '<img')"}
|
<span class="narskf-sm">{$item.desc|raw}</span>
|
||||||
<div class="narskfactive-ewm" style="display: none;">{$item.desc|raw}</div>
|
{/notempty}
|
||||||
{/if}
|
{notempty name="item.extra_image"}
|
||||||
|
<div class="narskfactive-ewm" style="display: none;">
|
||||||
|
<img src="{$item.extra_image}" alt="" />
|
||||||
|
</div>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
</div>
|
</div>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|||||||
@@ -49,8 +49,9 @@
|
|||||||
{notempty name="contacts"}
|
{notempty name="contacts"}
|
||||||
<h1 class="nhlpapp-title">{:lang_i18n('联系我们')}</h1>
|
<h1 class="nhlpapp-title">{:lang_i18n('联系我们')}</h1>
|
||||||
<div class="nhlpapp-row">
|
<div class="nhlpapp-row">
|
||||||
|
{assign name="first_section" value=":array_splice($contacts, 0, count($contacts) - 3)"}
|
||||||
<div class="sec-1">
|
<div class="sec-1">
|
||||||
{volist name="contacts" id="co" key="idx" offset="0" length="4"}
|
{volist name="first_section" id="co"}
|
||||||
<a class="nhlplxwmit" {notempty name="co.link"}href="{$co.link}"{/notempty}>
|
<a class="nhlplxwmit" {notempty name="co.link"}href="{$co.link}"{/notempty}>
|
||||||
<img src="{$co.image}" class="lximg">
|
<img src="{$co.image}" class="lximg">
|
||||||
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
<div class="sec-2">
|
<div class="sec-2">
|
||||||
{volist name="contacts" id="co" key="idx" offset="4"}
|
{volist name="contacts" id="co"}
|
||||||
<a class="nhlplxwmit nhlplxwmit-w1" {notempty name="co.link"}href="{$co.link}"{/notempty}>
|
<a class="nhlplxwmit nhlplxwmit-w1" {notempty name="co.link"}href="{$co.link}"{/notempty}>
|
||||||
<img src="{$co.image}" class="lximg">
|
<img src="{$co.image}" class="lximg">
|
||||||
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}<br></span>
|
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}<br></span>
|
||||||
|
|||||||
@@ -24,16 +24,12 @@
|
|||||||
<a class="narskfit" href="{$item.link}">
|
<a class="narskfit" href="{$item.link}">
|
||||||
<img src="{$item.image}" class="narskico-img" />
|
<img src="{$item.image}" class="narskico-img" />
|
||||||
<span class="narskf-title">{$item.title}</span>
|
<span class="narskf-title">{$item.title}</span>
|
||||||
{notempty name="item.title_short"}
|
|
||||||
<span class="narskf-sm">{$item.title_short}</span>
|
|
||||||
{/notempty}
|
|
||||||
{notempty name="item.desc"}
|
{notempty name="item.desc"}
|
||||||
{if condition="str_contains($item.desc, '<img')"}
|
<span class="narskf-sm">{$item.desc|raw}</span>
|
||||||
|
{/notempty}
|
||||||
|
{notempty name="item.extra_image"}
|
||||||
<div class="narskfactive-ewm">
|
<div class="narskfactive-ewm">
|
||||||
{else/}
|
<img src="{$item.extra_image}" alt="" />
|
||||||
<div class="narskf-sm narskf-font-26">
|
|
||||||
{/if}
|
|
||||||
{$item.desc|raw}
|
|
||||||
</div>
|
</div>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -57,33 +57,37 @@
|
|||||||
<h1 class="lxwmtitle">{:lang_i18n('联系我们')}</h1>
|
<h1 class="lxwmtitle">{:lang_i18n('联系我们')}</h1>
|
||||||
<div class="nhlp-row">
|
<div class="nhlp-row">
|
||||||
<div class="nhlp-row-content">
|
<div class="nhlp-row-content">
|
||||||
{volist name="contacts" id="co" key="idx" offset="0" length="3"}
|
{assign name="fist_section" value=":array_splice($contacts, 0, 3)" /}
|
||||||
<a class="nhlplxwmit nhlplxwmit-w1" {notempty name="co.link"}href="{$co.link}"{/notempty} {eq name="idx" value="3"}style="margin-right: 0;"{/eq}>
|
{volist name="fist_section" id="co"}
|
||||||
|
<a class="nhlplxwmit nhlplxwmit-w1" {notempty name="co.link"}href="{$co.link}"{/notempty}>
|
||||||
<img src="{$co.image}" class="lximg" />
|
<img src="{$co.image}" class="lximg" />
|
||||||
{if condition="!empty($co.desc) && str_contains($co.desc, '<img')"}
|
{notempty name="co.extra_image"}
|
||||||
<img src="{:get_path_from_img_tag($co.desc)}" class="lxewmimg" />
|
<img src="{$co.extra_image}" class="lxewmimg" />
|
||||||
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
{/notempty}
|
||||||
{else/}
|
|
||||||
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
||||||
|
{notempty name="co.desc"}
|
||||||
<span class="t2" {:style(['color'=>$co.desc_txt_color])}>{$co.desc|raw}</span>
|
<span class="t2" {:style(['color'=>$co.desc_txt_color])}>{$co.desc|raw}</span>
|
||||||
{/if}
|
{/notempty}
|
||||||
</a>
|
</a>
|
||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
|
{assign name="second_section" value=":array_chunk($contacts, 4)" /}
|
||||||
|
{volist name="second_section" id="chunk"}
|
||||||
<div class="nhlp-row-content">
|
<div class="nhlp-row-content">
|
||||||
{volist name="contacts" id="co" key="idx" offset="3"}
|
{volist name="chunk" id="co"}
|
||||||
<a class="nhlplxwmit nhlplxwmit-w2" {notempty name="co.link"}href="{$co.link}"{/notempty} {eq name="idx%4" value="0"}style="margin-right: 0;"{/eq}>
|
<a class="nhlplxwmit nhlplxwmit-w2" {notempty name="co.link"}href="{$co.link}"{/notempty}>
|
||||||
<img src="{$co.image}" class="lximg" />
|
<img src="{$co.image}" class="lximg" />
|
||||||
{if condition="!empty($co.desc) && str_contains($co.desc, '<img')"}
|
{notempty name="co.extra_image"}
|
||||||
<img src="{:get_path_from_img_tag($co.desc)}" class="lxewmimg" />
|
<img src="{$co.extra_image}" class="lxewmimg" />
|
||||||
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
{/notempty}
|
||||||
{else/}
|
|
||||||
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
|
||||||
|
{notempty name="co.desc"}
|
||||||
<span class="t2" {:style(['color'=>$co.desc_txt_color])}>{$co.desc|raw}</span>
|
<span class="t2" {:style(['color'=>$co.desc_txt_color])}>{$co.desc|raw}</span>
|
||||||
{/if}
|
{/notempty}
|
||||||
</a>
|
</a>
|
||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
|||||||
Reference in New Issue
Block a user