diff --git a/app/Middleware/Auth/ApiMiddleware.php b/app/Middleware/Auth/ApiMiddleware.php index f419fa6..635b6d4 100644 --- a/app/Middleware/Auth/ApiMiddleware.php +++ b/app/Middleware/Auth/ApiMiddleware.php @@ -45,18 +45,18 @@ class ApiMiddleware implements MiddlewareInterface { // 拦截v1路由 - // $routePath = $this->request->getPathInfo(); - // $routePath = explode('/', $routePath); - // if ($routePath[1] == 'v1') { - // $content = [ - // "status" => 'ok', - // "code" => 99999, - // "result" => [], - // "message" => '服务已停止升级,稍后请升级更新小程序(如不能自动更新,请删除小程序后重新进入小程序)' - // ]; - // - // return $this->response->json($content); - // } + $routePath = $this->request->getPathInfo(); + $routePath = explode('/', $routePath); + if ($routePath[1] == 'v1') { + $content = [ + "status" => 'ok', + "code" => 99999, + "result" => [], + "message" => '服务已停止升级,稍后请升级更新小程序(如不能自动更新,请删除小程序后重新进入小程序)' + ]; + + return $this->response->json($content); + } // 签名校验