fix: pc/mobile banner的extra_image取值

This commit is contained in:
2025-06-30 10:57:06 +08:00
parent 6cd1b1ad76
commit 51450677e5
5 changed files with 32 additions and 38 deletions

View File

@@ -24,16 +24,12 @@
<a class="narskfit" href="{$item.link}">
<img src="{$item.image}" class="narskico-img" />
<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"}
{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">
{else/}
<div class="narskf-sm narskf-font-26">
{/if}
{$item.desc|raw}
<img src="{$item.extra_image}" alt="" />
</div>
{/notempty}
</a>

View File

@@ -57,33 +57,37 @@
<h1 class="lxwmtitle">{:lang_i18n('联系我们')}</h1>
<div class="nhlp-row">
<div class="nhlp-row-content">
{volist name="contacts" id="co" key="idx" offset="0" length="3"}
<a class="nhlplxwmit nhlplxwmit-w1" {notempty name="co.link"}href="{$co.link}"{/notempty} {eq name="idx" value="3"}style="margin-right: 0;"{/eq}>
{assign name="fist_section" value=":array_splice($contacts, 0, 3)" /}
{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" />
{if condition="!empty($co.desc) && str_contains($co.desc, '<img')"}
<img src="{:get_path_from_img_tag($co.desc)}" class="lxewmimg" />
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
{else/}
{notempty name="co.extra_image"}
<img src="{$co.extra_image}" class="lxewmimg" />
{/notempty}
<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>
{/if}
{/notempty}
</a>
{/volist}
</div>
{assign name="second_section" value=":array_chunk($contacts, 4)" /}
{volist name="second_section" id="chunk"}
<div class="nhlp-row-content">
{volist name="contacts" id="co" key="idx" offset="3"}
<a class="nhlplxwmit nhlplxwmit-w2" {notempty name="co.link"}href="{$co.link}"{/notempty} {eq name="idx%4" value="0"}style="margin-right: 0;"{/eq}>
{volist name="chunk" id="co"}
<a class="nhlplxwmit nhlplxwmit-w2" {notempty name="co.link"}href="{$co.link}"{/notempty}>
<img src="{$co.image}" class="lximg" />
{if condition="!empty($co.desc) && str_contains($co.desc, '<img')"}
<img src="{:get_path_from_img_tag($co.desc)}" class="lxewmimg" />
<span class="t1" {:style(['color'=>$co.title_txt_color])}>{$co.title}</span>
{else/}
{notempty name="co.extra_image"}
<img src="{$co.extra_image}" class="lxewmimg" />
{/notempty}
<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>
{/if}
{/notempty}
</a>
{/volist}
</div>
{/volist}
</div>
</div>
{/notempty}