feat : city
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user