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