|
|
|
@ -9,6 +9,7 @@ use App\TaskWorker\SSDBTask; |
|
|
|
use Hashids\Hashids; |
|
|
|
use Hyperf\HttpServer\Contract\RequestInterface as HttpRequest; |
|
|
|
use Hyperf\HttpServer\Contract\ResponseInterface as HttpResponse; |
|
|
|
use Hyperf\HttpServer\Router\Router; |
|
|
|
use Hyperf\Utils\ApplicationContext; |
|
|
|
use Psr\Container\ContainerInterface; |
|
|
|
use Psr\Http\Message\ResponseInterface; |
|
|
|
@ -42,6 +43,21 @@ class ApiMiddleware implements MiddlewareInterface |
|
|
|
|
|
|
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
|
|
{ |
|
|
|
|
|
|
|
// 拦截v1路由
|
|
|
|
// $routePath = $this->request->getPathInfo();
|
|
|
|
// $routePath = explode('/', $routePath);
|
|
|
|
// if ($routePath[1] == 'v1') {
|
|
|
|
// $content = [
|
|
|
|
// "status" => 'ok',
|
|
|
|
// "code" => 99999,
|
|
|
|
// "result" => [],
|
|
|
|
// "message" => '服务已停止升级,稍后请升级更新小程序(如不能自动更新,请删除小程序后重新进入小程序)'
|
|
|
|
// ];
|
|
|
|
//
|
|
|
|
// return $this->response->json($content);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 签名校验
|
|
|
|
|
|
|
|
# 获取参数
|
|
|
|
|