feat: 品牌故事

This commit is contained in:
2025-04-16 16:50:36 +08:00
parent 4151e893bd
commit f7e0ecc9fd
6 changed files with 95 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
<?php
declare (strict_types = 1);
namespace app\index\controller;
use app\admin\controller\v1\BannerItem;
use app\index\model\SysBannerItemModel;
use think\facade\View;
/**
* 品牌故事控制器
*/
class Brand extends Common
{
/**
* 品牌故事
*/
public function story()
{
// 获取品牌故事banner
$banners = SysBannerItemModel::hasWhere('banner', [
'language_id' => $this->lang_id,
'unique_label' => 'BANNER_67ff632a5f7aa'
])
->type('image')
->enabled(true)
->visible(['id', 'title', 'title_txt_color', 'image', 'desc', 'desc_txt_color', 'link'])
->order(['sort' => 'asc', 'id' => 'desc'])
->select();
View::assign('banners', $banners);
return View::fetch('story');
}
/**
* 品牌里程
*/
public function mileage()
{
return View::fetch('mileage');
}
}