From f7cbd5c33127c9062f557a6c05fd48fcfbaef432 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Wed, 9 Aug 2023 14:04:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E5=8F=82=E6=95=B0=E4=BC=A0?= =?UTF-8?q?=E8=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/application/api/controller/pass/Passcc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/application/api/controller/pass/Passcc.php b/source/application/api/controller/pass/Passcc.php index e6ed82f..b4a36b5 100644 --- a/source/application/api/controller/pass/Passcc.php +++ b/source/application/api/controller/pass/Passcc.php @@ -5,6 +5,7 @@ namespace app\api\controller\pass; use app\api\controller\Controller; use app\common\dm\Dm; +use app\common\exception\BaseException; use app\common\logic\PassFlow; use app\common\model\Pass; use think\Db; @@ -16,6 +17,14 @@ class Passcc extends Controller echo 1111; } + public function _initialize() + { + $type = $this->request->param('type'); + if (!empty($type)) { + if (!preg_match('/^[1-2]$/',$type)) throw new BaseException(['msg' => 'type字段参数错误']); + } + } + /** * 分时时间段接口 <首页-客流趋势> * @return array