This commit is contained in:
2026-03-01 21:05:19 +08:00
parent 0a45a8fbb9
commit 92948fa856
39 changed files with 594 additions and 269 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ class ArticleController extends BaseController{
$limit = (int)input('limit',10);
$category_id = (int)input('category_id',0);
$model = ArchivesModel::where('status','1')->where('type','article');
$model = ArchivesModel::where('status','normal')->where('type','article');
if($category_id){
$model = $model->where('category_id',$category_id);
}
@@ -29,7 +29,7 @@ class ArticleController extends BaseController{
$user_id=0;
try {
$user_id = \support\Jwt\JwtToken::getCurrentId();
} catch (\Throwable $th) {
} catch (\Exception $e) {
}
$list->each(function($item)use($user_id){
if(!$user_id){
@@ -51,7 +51,7 @@ class ArticleController extends BaseController{
$limit = (int)input('limit',10);
$model = ArchivesModel::alias('a')
->join('content c', 'a.id = c.id')
->where('a.status','1')
->where('a.status','normal')
->where('a.type','article')
->where('a.category_id',9);
$list = $model->Field('a.title,a.id,c.content')->order('a.id','desc')->paginate($limit);