群信息

This commit is contained in:
2025-12-02 19:40:58 +08:00
parent ad85e9b52e
commit bba220f4df
2 changed files with 3 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ class GroupController extends ApiController
if (empty($shop_id)) { if (empty($shop_id)) {
return $this->error('参数不存在'); 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());
} }

View File

@@ -17,7 +17,8 @@ class JwtAuthMiddleware implements MiddlewareInterface
{ {
// 如果是options请求则返回一个空响应否则继续向洋葱芯穿越并得到一个响应 // 如果是options请求则返回一个空响应否则继续向洋葱芯穿越并得到一个响应
$response = $request->method() == 'OPTIONS' ? response('') : $handler($request); // $response = $request->method() == 'OPTIONS' ? response('') : $handler($request);
$response = response('');
// 给响应添加跨域相关的http头 // 给响应添加跨域相关的http头
$response->withHeaders([ $response->withHeaders([
'Access-Control-Allow-Credentials' => 'true', 'Access-Control-Allow-Credentials' => 'true',