From c7deee9ae9a946ac4af3f530791f720402b7692d Mon Sep 17 00:00:00 2001 From: yumo Date: Wed, 3 May 2023 22:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=94=9F=E6=88=90=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/BaseController.php | 4 +--- app/admin/controller/Index.php | 8 ++++---- app/common/tpl/dispatch_jump.tpl | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/BaseController.php b/app/BaseController.php index bca8683..ebc71f3 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -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); } diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 21dc01d..6912828 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -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 .= ''; if (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) { - $this->error('站点地图更新失败!'); + $this->error('站点地图更新失败!',"/admin/"); } else { - $this->success('站点地图全部更新完成!', null, 'stop'); + $this->success('站点地图全部更新完成!', "/admin/"); } } //写入 diff --git a/app/common/tpl/dispatch_jump.tpl b/app/common/tpl/dispatch_jump.tpl index b5370ab..13a4735 100644 --- a/app/common/tpl/dispatch_jump.tpl +++ b/app/common/tpl/dispatch_jump.tpl @@ -109,7 +109,7 @@