mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
优化查询代码;增加RSS1
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\common\tools;
|
||||
|
||||
use app\model\Post;
|
||||
|
||||
use DateTime;
|
||||
use Thepixeldeveloper\Sitemap\Drivers\XmlWriterDriver;
|
||||
use Thepixeldeveloper\Sitemap\Url;
|
||||
@@ -18,7 +18,7 @@ class Sitemap
|
||||
|
||||
$urlset_page_post = new Urlset();
|
||||
|
||||
$index_url = new Url(Request::scheme() . '://' . get_system_config('main_domain', Request::host()));
|
||||
$index_url = new Url(Site::indexUrl());
|
||||
|
||||
$index_url->setChangeFreq('always');
|
||||
|
||||
@@ -26,7 +26,7 @@ class Sitemap
|
||||
|
||||
$urlset_page_post->add($index_url);
|
||||
|
||||
$list_post = Post::cache(60)->where('status', 1)->select();
|
||||
$list_post = Site::mapAllPost();
|
||||
|
||||
foreach ($list_post as $model_post) {
|
||||
$url_post = new Url($model_post->read_url);
|
||||
|
||||
Reference in New Issue
Block a user