diff --git a/app/index/controller/Post.php b/app/index/controller/Post.php index aeca4b0..34b302a 100644 --- a/app/index/controller/Post.php +++ b/app/index/controller/Post.php @@ -58,6 +58,10 @@ class Post extends Common } ])->where('uid', $uid)->find(); + if (empty($model_post)) { + return $this->error('链接已失效', '/'); + } + $model_post->hits = $model_post->hits + 1; $model_post->save();