From 7396e69a6165248bebdef884a31d3a038b8bf8e2 Mon Sep 17 00:00:00 2001 From: jbrazz <2436953959@qq.com> Date: Thu, 7 Nov 2019 16:39:16 +0800 Subject: [PATCH] upt --- Application/Admin/Controller/AjaxController.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 98755d565..a66743da3 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -153,7 +153,10 @@ class AjaxController extends ThinkController{ public function getPromotersByLevel() { - $level = I('level', 1); + $level = I('level'); + if (!$level) { + return $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>[]]); + } $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevel($level)]); }