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); } }