增加通用开头功能

This commit is contained in:
2023-06-27 00:51:30 +08:00
parent a28a1c6a6a
commit 839a8e4734
9 changed files with 67 additions and 28 deletions

View File

@@ -7,13 +7,13 @@ class Site
{
public static function mapAllPost()
{
$list_post = \app\model\Post::cache(60)->where('status', 1)->select();
$list_post = \app\model\Post::cache(60)->where('type',3)->where('status', 1)->select();
return $list_post;
}
public static function mapRecentlyPost()
{
$list_post = \app\model\Post::cache(60)->where('status', 1)->order('publish_time', "desc")->limit(25)->select();
$list_post = \app\model\Post::cache(60)->where('type',3)->where('status', 1)->order('publish_time', "desc")->limit(25)->select();
return $list_post;
}