16
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user