Explorar o código

返回状态码

bianjunhui %!s(int64=2) %!d(string=hai) anos
pai
achega
4f999f01dc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      application/common/controller/Api.php

+ 1 - 1
application/common/controller/Api.php

@@ -167,7 +167,7 @@ class Api
      * @param string $type   输出类型
      * @param array  $header 发送的 Header 信息
      */
-    protected function success($msg = '', $data = null, $code = 1, $type = null, array $header = [])
+    protected function success($msg = '', $data = null, $code = 200, $type = null, array $header = [])
     {
         $this->result($msg, $data, $code, $type, $header);
     }