feat: 文化介绍
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 售后政策
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user