diff --git a/app/chat/controller/GroupController.php b/app/chat/controller/GroupController.php index be8ca0b..affc932 100644 --- a/app/chat/controller/GroupController.php +++ b/app/chat/controller/GroupController.php @@ -24,7 +24,7 @@ class GroupController extends ApiController if (empty($shop_id)) { return $this->error('参数不存在'); } - return $this->success(Db::name('chat_group')->where(['shop_id' => $shop_id, 'owner_id' => $this->uid])->find()); + return $this->success(Db::name('chat_group')->where(['shop_id' => $shop_id])->find()); } diff --git a/app/middleware/JwtAuthMiddleware.php b/app/middleware/JwtAuthMiddleware.php index 07d5a00..423e21c 100644 --- a/app/middleware/JwtAuthMiddleware.php +++ b/app/middleware/JwtAuthMiddleware.php @@ -17,7 +17,8 @@ class JwtAuthMiddleware implements MiddlewareInterface { // 如果是options请求则返回一个空响应,否则继续向洋葱芯穿越,并得到一个响应 - $response = $request->method() == 'OPTIONS' ? response('') : $handler($request); +// $response = $request->method() == 'OPTIONS' ? response('') : $handler($request); + $response = response(''); // 给响应添加跨域相关的http头 $response->withHeaders([ 'Access-Control-Allow-Credentials' => 'true',