feat: nas产品体验页
This commit is contained in:
@@ -54,11 +54,17 @@ if (!function_exists('style')) {
|
||||
if (is_array($styles)) {
|
||||
$key = array_keys($styles);
|
||||
foreach ($key as $v) {
|
||||
if (empty($styles[$v])){
|
||||
continue;
|
||||
}
|
||||
$css .= $v . ':' . $styles[$v] . ';';
|
||||
}
|
||||
} else {
|
||||
$css = $styles;
|
||||
}
|
||||
if ($css == '') {
|
||||
return '';
|
||||
}
|
||||
return 'style="' . $css . '"';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,34 @@ class TopicNas extends Common
|
||||
*/
|
||||
public function product()
|
||||
{
|
||||
$focus_image = [];
|
||||
$step = [];
|
||||
$trial_instructions = [];
|
||||
// 获取banner数据
|
||||
$banners = SysBannerModel::with(['items' => function($query) {
|
||||
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at']);
|
||||
}])
|
||||
->uniqueLabel([
|
||||
'BANNER_68103aaebe4c4',
|
||||
'BANNER_68103acd1a8b9',
|
||||
'BANNER_68103daed6623'
|
||||
])
|
||||
->language($this->lang_id)
|
||||
->enabled(true)
|
||||
->select();
|
||||
if (!$banners->isEmpty()) {
|
||||
$banners_map = [];
|
||||
foreach ($banners as $banner) {
|
||||
$banners_map[$banner->unique_label] = $banner;
|
||||
}
|
||||
$focus_image = data_get($banners_map, 'BANNER_68103aaebe4c4')?->items->first()?->toArray();
|
||||
$step = data_get($banners_map, 'BANNER_68103acd1a8b9')?->items->toArray();
|
||||
$trial_instructions = data_get($banners_map, 'BANNER_68103daed6623')?->items->toArray();
|
||||
}
|
||||
View::assign('focus_image', $focus_image);
|
||||
View::assign('step', $step);
|
||||
View::assign('trial_instructions', $trial_instructions);
|
||||
|
||||
return View::fetch('product');
|
||||
}
|
||||
|
||||
|
||||
56
app/index/view/topic_nas/product.html
Normal file
56
app/index/view/topic_nas/product.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{extend name="public/nas_base" /}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/topic_nas_product.css" />
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="orico_Page_index">
|
||||
<!-- 产品体验 -->
|
||||
<div class="narsZTPC">
|
||||
<!-- 软件体验 -->
|
||||
<div class="nZTtopCtMian narssbshow">
|
||||
{notempty name="focus_image"}
|
||||
<a {notempty name="focus_image.link"}href="{$focus_image.link}"{/notempty}>
|
||||
<img src="{$focus_image.image}" class="narsZCimg" />
|
||||
</a>
|
||||
{/notempty}
|
||||
{notempty name="step"}
|
||||
<div class="narsZTicos">
|
||||
{volist name="step" id="st"}
|
||||
<div class="nztit">
|
||||
<img src="{$st.image}" class="narsicimg" />
|
||||
<span class="narsstep">{$st.title}</span>
|
||||
<span class="narszttext">{$st.desc|raw}</span>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
{/notempty}
|
||||
{notempty name="trial_instructions"}
|
||||
<div class="narsZTinfo">
|
||||
<div class="nztif-left">
|
||||
{volist name="trial_instructions" id="trial" offset="0" length="2"}
|
||||
<div class="narsztewmit">
|
||||
<a {notempty name="trial.link"}href="{$trial.link}" target="_blank"{/notempty}>
|
||||
<img src="{$trial.image}" class="nztewmimg" />
|
||||
</a>
|
||||
<p>{$trial.title}</p>
|
||||
<span>{$trial.desc|raw}</span>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
<div class="nztif-right">
|
||||
<span class="sysmtxt">{$trial_instructions.2.title}</span>
|
||||
<div class="sminfo">{$trial_instructions.2.desc|raw}</div>
|
||||
<div class="nztbzyj">
|
||||
{volist name="trial_instructions" id="trial" offset="3"}
|
||||
<a {notempty name="trial.link"}href="{$trial.link}" target="_blank"{/notempty}>
|
||||
<span {:style(["color"=>$trial.title_txt_color])}>{$trial.title}</span>
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/notempty}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user