失效链接跳转

This commit is contained in:
augushong
2021-03-23 20:51:40 +08:00
parent cc83df7fb9
commit 79dc8a05ee

View File

@@ -58,6 +58,10 @@ class Post extends Common
} }
])->where('uid', $uid)->find(); ])->where('uid', $uid)->find();
if (empty($model_post)) {
return $this->error('链接已失效', '/');
}
$model_post->hits = $model_post->hits + 1; $model_post->hits = $model_post->hits + 1;
$model_post->save(); $model_post->save();