user = $result['msg']; $this->uid = $result['msg']['id']; } //权限验证 $module = strtolower(request()->module()); $controller = strtolower(request()->controller()); $action = strtolower(request()->action()); $nowUrl = $module . '/' . $controller . '/' . $action; $access = my_model('AuthRule', 'logic', 'admin')->hasAccessByName($nowUrl, $result['msg']['groupId']); if (!$access) { ajax_return_error('无权访问!'); } } }