feat: 品牌故事
This commit is contained in:
43
app/index/controller/Brand.php
Normal file
43
app/index/controller/Brand.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user