api增加登录用户的信息
This commit is contained in:
parent
422a4bc995
commit
7dbe36dac5
@ -14,6 +14,7 @@ use think\exception\HttpResponseException;
|
|||||||
use think\facade\Request;
|
use think\facade\Request;
|
||||||
use think\facade\Session;
|
use think\facade\Session;
|
||||||
use think\facade\View;
|
use think\facade\View;
|
||||||
|
use think\facade\Db;
|
||||||
use think\Response;
|
use think\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,6 +101,8 @@ abstract class BaseController
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$this->uid = Session::get($session_admin);
|
$this->uid = Session::get($session_admin);
|
||||||
|
$login_admin = Db::name('Admin')->where(['id' => $this->uid])->find();
|
||||||
|
View::assign('login_admin', $login_admin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user