model=new ConsultTemp(); } public function info(){ $param =$this->request->param(["id"],"post","trim"); $info = $this->model->with(['brand','cat','unit'])->findOrEmpty($param['id']); if($info->isEmpty())$this->error("未找到信息"); $place = ['provice_code'=>'','city_code'=>'','area_code'=>'']; if($info['delivery_place']!=''){ list($place['provice_code'],$place['city_code'],$place['area_code'])=explode(',',$info['delivery_place']); } $info['delivery_place_cn']=GetAddr(json_encode($place)); $place = ['provice_code'=>'','city_code'=>'','area_code'=>'']; if($info['origin_place']!=''){ list($place['provice_code'],$place['city_code'],$place['area_code'])=explode(',',$info['origin_place']); } $info['origin_place_cn']=GetAddr(json_encode($place)); $this->success("获取成功",$info); } public function getList(){ $param= $this->request->param(["bidNo"=>""],"post","trim"); $list = $this->model->with(["brand","cat","unit"])->where("bidNo",$param['bidNo'])->select(); $this->success('获取成功',$list); } public function delete(){ $param= $this->request->param(['id'=>''],'post','trim'); $info = $this->model->findOrEmpty($param['id']); if($info->isEmpty())$this->error('未找到信息'); $del= $info->delete(); $del?$this->success('删除成功'):$this->error("删除失败"); } }