feat: 文化介绍

This commit is contained in:
2025-04-22 17:28:23 +08:00
parent 7c196f75e2
commit a66dc9b094
4 changed files with 879 additions and 0 deletions

View File

@@ -111,6 +111,40 @@ class AboutUs extends Common
return View::fetch('mileage');
}
/**
* 文化介绍
*/
public function culture()
{
$focus_image = [];
$culture = [];
// 获取文化介绍banner
$banner = SysBannerModel::with(['items' => function($query) {
$query->withoutField(['status', 'created_at', 'updated_at', 'deleted_at'])
->where('status', '=', 1)
->order(['sort' => 'asc', 'id' => 'desc']);
}])
->uniqueLabel([
"BANNER_68075a636e648",
"BANNER_68075bf4dd0f5",
])
->language($this->lang_id)
->enabled(true)
->select();
if (!$banner->isEmpty()) {
$banner_map = [];
foreach ($banner as $v) {
$banner_map[$v->unique_label] = $v;
}
$focus_image = data_get($banner_map, 'BANNER_68075a636e648')?->items->first()?->toArray();
$culture = data_get($banner_map, 'BANNER_68075bf4dd0f5')?->items->toArray();
}
View::assign('focus_image', $focus_image);
View::assign('culture', $culture);
return View::fetch('culture');
}
/**
* 售后政策
*/