mirror of https://github.com/1099438829/apeblog
修正生成网站地图
This commit is contained in:
parent
8c2affa887
commit
c7deee9ae9
|
|
@ -104,7 +104,7 @@ abstract class BaseController
|
|||
* 操作成功跳转的快捷方法
|
||||
* @access protected
|
||||
* @param mixed $msg 提示信息
|
||||
* @param string $url 跳转的URL地址
|
||||
* @param string|null $url 跳转的URL地址
|
||||
* @param mixed $data 返回的数据
|
||||
* @param integer $wait 跳转等待时间
|
||||
* @param array $header 发送的Header信息
|
||||
|
|
@ -132,7 +132,6 @@ abstract class BaseController
|
|||
} else if ($type == 'json') {
|
||||
$response = json($result);
|
||||
}
|
||||
|
||||
throw new HttpResponseException($response);
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +167,6 @@ abstract class BaseController
|
|||
} else if ($type == 'json') {
|
||||
$response = json($result);
|
||||
}
|
||||
|
||||
throw new HttpResponseException($response);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class Index extends AuthController
|
|||
//获取文章分类url
|
||||
$documentCategoryModel = new DocumentCategoryModel();
|
||||
$categoryInfo = $documentCategoryModel->field('id,title,create_time')
|
||||
->where('display', 1)->where('status', 1)
|
||||
->where('status', 1)->where('status', 1)
|
||||
->page($page, $pagesize)
|
||||
->order('id desc')->select();
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ class Index extends AuthController
|
|||
//获取详细页分类url
|
||||
$documentModel = new DocumentModel();
|
||||
$documentInfo = $documentModel->field('id,create_time')
|
||||
->where('status', 1)
|
||||
->where('display', 1)
|
||||
->page($page, $pagesize)
|
||||
->order('id desc')->select();
|
||||
|
||||
|
|
@ -141,9 +141,9 @@ class Index extends AuthController
|
|||
if (count($categoryInfo) < $pagesize && count($documentInfo) < $pagesize) {
|
||||
$str .= '</urlset>';
|
||||
if (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) {
|
||||
$this->error('站点地图更新失败!');
|
||||
$this->error('站点地图更新失败!',"/admin/");
|
||||
} else {
|
||||
$this->success('站点地图全部更新完成!', null, 'stop');
|
||||
$this->success('站点地图全部更新完成!', "/admin/");
|
||||
}
|
||||
}
|
||||
//写入
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
{:web_config("copyright")}
|
||||
{:system_config("copyright")}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue