|
|
@@ -172,7 +172,9 @@ class ArticleService extends BaseService
|
|
|
}
|
|
|
|
|
|
$info = $this->model->where(['id'=> $id,'status'=>1,'mark'=>1])
|
|
|
- ->where('publish_at','<=', date('Y-m-d H:i:s'))
|
|
|
+ ->where(function($query) {
|
|
|
+ $query->where('publish_at','<=', date('Y-m-d H:i:s'))->orWhereNull('publish_at');
|
|
|
+ })
|
|
|
->select($field)
|
|
|
->first();
|
|
|
$info = $info? $info->toArray() : [];
|