feat: nas下载页

This commit is contained in:
2025-04-29 15:49:39 +08:00
parent a010e7e492
commit 8a8c2c3b9e
5 changed files with 234 additions and 0 deletions

View File

@@ -177,12 +177,55 @@ class TopicNas extends Common
{
return View::fetch('help');
}
/**
* 专题-Nas帮助中心详情
*/
public function helpDetail()
{
return View::fetch('help_detail');
}
/**
* 专题-Nas软件下载页
*/
public function download()
{
$data = [];
// 获取banner数据
$banners = SysBannerModel::with(['items' => function($query) {
$query->withoutField(['sort', 'created_at', 'updated_at', 'deleted_at']);
}])
->uniqueLabel([
'BANNER_6810798e6e828',
'BANNER_68107a0a63910',
'BANNER_681079cfa83c9',
'BANNER_68107a1584238'
])
->language($this->lang_id)
->enabled(true)
->order(['sort' => 'asc', 'id' => 'desc'])
->select();
if (!$banners->isEmpty()) {
$banners_map = [];
foreach ($banners as $banner) {
$banners_map[$banner->unique_label] = $banner;
}
$cyber_image = data_get($banners_map, 'BANNER_6810798e6e828')?->items->first()?->toArray();
if (!empty($cyber_image)) $data['cyber']['focus_image'] = $cyber_image;
$weline_image = data_get($banners_map, 'BANNER_68107a0a63910')?->items->first()?->toArray();
if (!empty($weline_image)) $data['weline']['focus_image'] = $weline_image;
$cyber_down_items = data_get($banners_map, 'BANNER_681079cfa83c9')?->items->toArray();
if (!empty($cyber_down_items)) $data['cyber']['down_items'] = $cyber_down_items;
$weline_down_items = data_get($banners_map, 'BANNER_68107a1584238')?->items->toArray();
if (!empty($weline_down_items)) $data['weline']['down_items'] = $weline_down_items;
}
View::assign('data', $data);
return View::fetch('download');
}
}