feat: nas产品体验页
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user