feat : basic
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Aspect\Admin;
|
||||
|
||||
use App\Exception\AdminException;
|
||||
use App\Exception\ErrException;
|
||||
use App\Service\Admin\Login\LoginService;
|
||||
use Hyperf\Di\Annotation\Aspect;
|
||||
use Hyperf\Di\Aop\AbstractAspect;
|
||||
@@ -43,9 +43,9 @@ class AdminLoginLogAspect extends AbstractAspect
|
||||
//todo 登录日志是否需要
|
||||
|
||||
return $result;
|
||||
} catch (AdminException $e) {
|
||||
} catch (ErrException $e) {
|
||||
// var_dump($e->getMessage());
|
||||
throw new AdminException($e->getMessage());
|
||||
throw new ErrException($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Aspect\Admin;
|
||||
|
||||
use App\Exception\AdminException;
|
||||
use App\Exception\ErrException;
|
||||
use App\Lib\Log;
|
||||
use Hyperf\Context\Context;
|
||||
use Hyperf\Di\Annotation\Aspect;
|
||||
@@ -65,7 +65,7 @@ class AdminOperationAspect extends AbstractAspect
|
||||
//
|
||||
// //如果没有id 说明没有登录 抛出异常
|
||||
// if (empty($adminId) || empty($roleId)) {
|
||||
// throw new AdminException('请先登录');
|
||||
// throw new ErrException('请先登录');
|
||||
// }
|
||||
//
|
||||
// //超级管理员不需要鉴权
|
||||
|
||||
Reference in New Issue
Block a user