feat : city

This commit is contained in:
2024-11-07 16:43:58 +08:00
parent 0c126ac468
commit 73e13c1e40
2 changed files with 7 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ class JwtAuthMiddleware implements MiddlewareInterface
Context::set('admin_id',$userJwt['data']->id);
Context::set('role_id',$userJwt['data']->role);
Context::set('city_id',$userJwt['data']->city_id);
return $handler->handle($request);
}

View File

@@ -43,6 +43,11 @@ abstract class BaseService
*/
protected int $roleId = 0;
/**
* @var int
*/
protected int $cityId = 0;
/**
* 主构造函数(获取请求对象)
*/
@@ -50,6 +55,7 @@ abstract class BaseService
{
$this->adminId = Context::get("admin_id",0);
$this->roleId = Context::get("role_id",0);
$this->cityId = Context::get("city_id",0);
}
/**