diff --git a/source/application/api/controller/pass/Passcc.php b/source/application/api/controller/pass/Passcc.php index b4a36b5..b68eb14 100644 --- a/source/application/api/controller/pass/Passcc.php +++ b/source/application/api/controller/pass/Passcc.php @@ -20,7 +20,7 @@ class Passcc extends Controller public function _initialize() { $type = $this->request->param('type'); - if (!empty($type)) { + if (!empty($type) || is_numeric($type)) { if (!preg_match('/^[1-2]$/',$type)) throw new BaseException(['msg' => 'type字段参数错误']); } }