Commit 7e3e923d authored by hujun's avatar hujun

后台id

parent ef264836
...@@ -89,6 +89,9 @@ class Basic extends Controller ...@@ -89,6 +89,9 @@ class Basic extends Controller
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1]; $requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
} }
$this->userName = Session::get("userName");
$this->userId = Session::get("userId");
if (!in_array($requestPath, $this->filterVerify)) { if (!in_array($requestPath, $this->filterVerify)) {
$this->userVerify(); $this->userVerify();
$this->userAuth($requestPath); $this->userAuth($requestPath);
...@@ -203,8 +206,6 @@ class Basic extends Controller ...@@ -203,8 +206,6 @@ class Basic extends Controller
* 验证登录时效 * 验证登录时效
*/ */
public function userVerify(){ public function userVerify(){
$this->userName = Session::get("userName");
$this->userId = Session::get("userId");
$this->lastLoginTime = Session::get("lastLoginTime"); $this->lastLoginTime = Session::get("lastLoginTime");
if(empty($this->userName) || empty($this->userId) || empty($this->lastLoginTime) ){ if(empty($this->userName) || empty($this->userId) || empty($this->lastLoginTime) ){
$this->redirect('/index/login'); $this->redirect('/index/login');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment