Skip to content

Commit b4cb6c2

Browse files
committed
应用调试模式下展示debug信息
1 parent 5247f32 commit b4cb6c2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

application/admin/controller/Base.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function buildSuccess($data = [], $msg = '操作成功', $code = ReturnCo
2828
'msg' => $msg,
2929
'data' => $data
3030
];
31-
if ($this->debug) {
31+
if (config('app.app_debug') && $this->debug) {
3232
$return['debug'] = $this->debug;
3333
}
3434

@@ -62,7 +62,7 @@ public function buildFailed($code, $msg = '操作失败', $data = []) {
6262
'msg' => $msg,
6363
'data' => $data
6464
];
65-
if ($this->debug) {
65+
if (config('app.app_debug') && $this->debug) {
6666
$return['debug'] = $this->debug;
6767
}
6868

application/api/controller/Base.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function buildSuccess($data = [], $msg = '操作成功', $code = ReturnCo
2626
'msg' => $msg,
2727
'data' => $data
2828
];
29-
if ($this->debug) {
29+
if (config('app.app_debug') && $this->debug) {
3030
$return['debug'] = $this->debug;
3131
}
3232

@@ -39,7 +39,7 @@ public function buildFailed($code, $msg = '操作失败', $data = []) {
3939
'msg' => $msg,
4040
'data' => $data
4141
];
42-
if ($this->debug) {
42+
if (config('app.app_debug') && $this->debug) {
4343
$return['debug'] = $this->debug;
4444
}
4545

0 commit comments

Comments
 (0)