Browse Source

固定参数传输

master
wanghongjun 3 years ago
parent
commit
47ae7b1aac
  1. 2
      source/application/api/controller/pass/Passcc.php

2
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字段参数错误']);
}
}

Loading…
Cancel
Save