作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

筛选学校问题

... ... @@ -283,11 +283,14 @@ class OrderpageController extends WeChatBaseController{
}
public function get_school(){
$user_id = cmf_get_current_user_id();
$my_user = Db::name('my_user')->where('uid',$user_id)->find();
$area = $this->request->param('area',0);
if(empty($area)){
$this->error('缺少必要参数');
}
$where['region'] = ['like',"%$area%"];
$where['uid'] = ['eq',$my_user['pid']];
$data = Db::name('school')->where($where)->select();
$this->success('SUCCESS','',$data);
}
... ...