mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-05-23 13:29:32 +08:00
modified 细节优化,变更用户信息获取方式
This commit is contained in:
parent
78a539a53b
commit
fb917ea2d8
@ -15,7 +15,7 @@ class AdminAuth {
|
|||||||
*/
|
*/
|
||||||
public function handle($request, \Closure $next) {
|
public function handle($request, \Closure $next) {
|
||||||
$header = config('apiadmin.CROSS_DOMAIN');
|
$header = config('apiadmin.CROSS_DOMAIN');
|
||||||
$ApiAuth = $request->header('ApiAuth', '');
|
$ApiAuth = $request->header('apiAuth', '');
|
||||||
if ($ApiAuth) {
|
if ($ApiAuth) {
|
||||||
$userInfo = cache('Login:' . $ApiAuth);
|
$userInfo = cache('Login:' . $ApiAuth);
|
||||||
$userInfo = json_decode($userInfo, true);
|
$userInfo = json_decode($userInfo, true);
|
||||||
|
@ -15,9 +15,7 @@ class AdminLog {
|
|||||||
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function handle($request, \Closure $next) {
|
public function handle($request, \Closure $next) {
|
||||||
$ApiAuth = $request->header('ApiAuth');
|
$userInfo = $request->API_ADMIN_USER_INFO;
|
||||||
$userInfo = cache('Login:' . $ApiAuth);
|
|
||||||
$userInfo = json_decode($userInfo, true);
|
|
||||||
$menuInfo = AdminMenu::get(['url' => $request->path()]);
|
$menuInfo = AdminMenu::get(['url' => $request->path()]);
|
||||||
|
|
||||||
if ($menuInfo) {
|
if ($menuInfo) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user