Browse Source

固定参数传输

master
wanghongjun 3 years ago
parent
commit
f7cbd5c331
  1. 9
      source/application/api/controller/pass/Passcc.php

9
source/application/api/controller/pass/Passcc.php

@ -5,6 +5,7 @@ namespace app\api\controller\pass;
use app\api\controller\Controller; use app\api\controller\Controller;
use app\common\dm\Dm; use app\common\dm\Dm;
use app\common\exception\BaseException;
use app\common\logic\PassFlow; use app\common\logic\PassFlow;
use app\common\model\Pass; use app\common\model\Pass;
use think\Db; use think\Db;
@ -16,6 +17,14 @@ class Passcc extends Controller
echo 1111; 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 * @return array

Loading…
Cancel
Save