feat: index - 首页及顶部导航处理

This commit is contained in:
2025-04-07 18:10:50 +08:00
parent f914082909
commit 24575245c0
101 changed files with 5823 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
<?php
declare (strict_types = 1);
namespace app\index\model;
use app\common\model\FaqBaseModel;
use think\model\concern\SoftDelete;
/**
* FAQ模型
* @mixin \think\Model
*/
class FaqModel extends FaqBaseModel
{
// 启用软删除
use SoftDelete;
// 软删除字段
protected $deleteTime = 'deleted_at';
// 语言范围查询
public function scopeLanguage($query, $language)
{
return $query->where('language_id', '=', $language);
}
// 推荐状态范围查询
public function scopeRecommend($query, bool $stat)
{
return $query->where('recommend', '=', (int)$stat);
}
}