mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Index.php
This commit is contained in:
parent
bddf0420f7
commit
635e0e829c
@ -39,7 +39,8 @@ class Index extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
/*! 根据运行模式刷新权限 */
|
/*! 根据运行模式刷新权限 */
|
||||||
AdminService::instance()->apply($this->app->isDebug());
|
$debug = $this->app->isDebug();
|
||||||
|
AdminService::instance()->apply($debug);
|
||||||
/*! 读取当前用户权限菜单树 */
|
/*! 读取当前用户权限菜单树 */
|
||||||
$this->menus = MenuService::instance()->getTree();
|
$this->menus = MenuService::instance()->getTree();
|
||||||
/*! 判断当前用户的登录状态 */
|
/*! 判断当前用户的登录状态 */
|
||||||
@ -58,15 +59,12 @@ class Index extends Controller
|
|||||||
* 修改用户资料
|
* 修改用户资料
|
||||||
* @login true
|
* @login true
|
||||||
* @param mixed $id 用户ID
|
* @param mixed $id 用户ID
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
|
||||||
* @throws \think\db\exception\DbException
|
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function info($id = 0)
|
public function info($id = 0)
|
||||||
{
|
{
|
||||||
$this->_applyFormToken();
|
$this->_applyFormToken();
|
||||||
if (AdminService::instance()->getUserId() === intval($id)) {
|
if (AdminService::instance()->getUserId() === intval($id)) {
|
||||||
$this->_form('SystemUser', 'admin@user/form', 'id', [], ['id' => $id]);
|
SystemUser::mForm('admin@user/form', 'id', [], ['id' => $id]);
|
||||||
} else {
|
} else {
|
||||||
$this->error('只能修改自己的资料!');
|
$this->error('只能修改自己的资料!');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user