fix : jwt

This commit is contained in:
2025-09-13 12:16:13 +08:00
parent a1fdeb9148
commit 48ad2ebd1b
9 changed files with 135 additions and 18 deletions

View File

@@ -21,11 +21,6 @@ use Hyperf\Di\Annotation\Inject;
class LoginService extends BaseAdminService
{
/**
* @var string jwt场景
*/
private string $jwt = 'admin';
/**
* @var AdminUserRepository
*/
@@ -54,7 +49,7 @@ class LoginService extends BaseAdminService
if ($adminInfo->status == AdminUserStatusCode::DISABLE) throw new ErrException('用户已禁用');
$jwtHandle = $this->tokenService->getJwt();
$jwtHandle = $this->tokenService->setJwt('admin')->getJwt();
return $this->adminReturn->success('success',[
'access_token' => $jwtHandle->builderAccessToken((string) $adminInfo->id)->toString(),