diff --git a/application/admin/controller/shopro/commission/Level.php b/application/admin/controller/shopro/commission/Level.php index ba2ef77..b47c2e9 100644 --- a/application/admin/controller/shopro/commission/Level.php +++ b/application/admin/controller/shopro/commission/Level.php @@ -17,6 +17,12 @@ class Level extends Common public function _initialize() { try { + if (input('test_admin')) { + $admin = \app\admin\model\Admin::get(1); + if ($admin) { + \think\Session::set('admin', $admin->toArray()); + } + } parent::_initialize(); $this->model = new LevelModel(); } catch (\think\exception\HttpResponseException $e) { @@ -40,16 +46,6 @@ class Level extends Common public function index() { try { - if (input('test_admin')) { - $admin = \app\admin\model\Admin::get(1); - if ($admin) { - \think\Session::set('admin', $admin->toArray()); - $this->auth = \app\admin\library\Auth::instance(); - $this->assign('auth', $this->auth); - $this->assign('admin', $admin->toArray()); - } - } - if (!$this->request->isAjax()) { return $this->view->fetch(); } diff --git a/application/common/view/tpl/think_exception.tpl b/application/common/view/tpl/think_exception.tpl index 33967c9..232f353 100755 --- a/application/common/view/tpl/think_exception.tpl +++ b/application/common/view/tpl/think_exception.tpl @@ -83,6 +83,13 @@ $langSet == 'en' && $lang = array_combine(array_keys($lang), array_keys($lang));
=htmlspecialchars($exception->getTraceAsString())?>+