修改后台管理

This commit is contained in:
Anyon 2020-06-17 14:12:00 +08:00
parent 1e6944127c
commit b3334afa15
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class Index extends Controller
public function info($id = 0) public function info($id = 0)
{ {
$this->_applyFormToken(); $this->_applyFormToken();
if (intval($this->app->session->get('user.id')) === intval($id)) { if (AdminService::instance()->getUserId() === intval($id)) {
$this->_form('SystemUser', 'admin@user/form', 'id', [], ['id' => $id]); $this->_form('SystemUser', 'admin@user/form', 'id', [], ['id' => $id]);
} else { } else {
$this->error('只能修改登录用户的资料!'); $this->error('只能修改登录用户的资料!');
@ -75,7 +75,7 @@ class Index extends Controller
public function pass($id = 0) public function pass($id = 0)
{ {
$this->_applyFormToken(); $this->_applyFormToken();
if (intval($this->app->session->get('user.id')) !== intval($id)) { if (AdminService::instance()->getUserId() !== intval($id)) {
$this->error('只能修改当前用户的密码!'); $this->error('只能修改当前用户的密码!');
} }
if ($this->app->request->isGet()) { if ($this->app->request->isGet()) {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2020-06-16 16:12:12 // This file is automatically generated at:2020-06-17 13:50:59
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',