From 098eae6aa0f224f712e6a6fd20b9a4811df40f19 Mon Sep 17 00:00:00 2001 From: huangdijia Date: Thu, 17 Dec 2015 11:59:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=8C=96success/error=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/traits/controller/view.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/traits/controller/view.php b/library/traits/controller/view.php index e7df4e7c..664f34b2 100644 --- a/library/traits/controller/view.php +++ b/library/traits/controller/view.php @@ -108,10 +108,10 @@ trait View * @param integer $wait 跳转等待时间 * @return void */ - protected function error($message, $jumpUrl = '', $wait = 5) + protected function error($message, $data = '', $jumpUrl = '', $wait = 5) { $jumpUrl = $jumpUrl ?: 'javascript:history.back(-1);'; - return $this->result('', $message, 0, $jumpUrl, $wait); + return $this->result($data, $message, 0, $jumpUrl, $wait); } /** @@ -122,10 +122,10 @@ trait View * @param integer $wait 跳转等待时间 * @return void */ - protected function success($message, $jumpUrl = '', $wait = 3) + protected function success($message, $data = '', $jumpUrl = '', $wait = 3) { $jumpUrl = $jumpUrl ?: $_SERVER["HTTP_REFERER"]; - return $this->result('', $message, 1, $jumpUrl, $wait); + return $this->result($data, $message, 1, $jumpUrl, $wait); } }