mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
45 lines
987 B
PHP
45 lines
987 B
PHP
<?php
|
|
namespace app\common\tools;
|
|
|
|
use think\facade\Request;
|
|
|
|
class Site
|
|
{
|
|
public static function mapAllPost()
|
|
{
|
|
$list_post = \app\model\Post::cache(60)->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();
|
|
|
|
return $list_post;
|
|
}
|
|
|
|
public static function name()
|
|
{
|
|
return get_system_config('site_name');
|
|
}
|
|
|
|
public static function indexUrl()
|
|
{
|
|
return Request::scheme() . '://' . get_system_config('main_domain', Request::host());
|
|
}
|
|
|
|
public static function desc()
|
|
{
|
|
return get_system_config('site_desc');
|
|
}
|
|
|
|
public static function logo()
|
|
{
|
|
return get_source_link(get_system_config('site_logo'));
|
|
}
|
|
|
|
public static function keywords()
|
|
{
|
|
return get_system_config('site_keywords');
|
|
}
|
|
} |