public function deleteInfo(){ $info_id = (int) $this->request->param('infoId'); $InfoModel = new InfoModel(); $infoData = $InfoModel::where([ 'info_id'=>$info_id ])->delete(); if(!$infoData){ $send = ['code'=>400,'msg'=>'删除失败']; }else{ $send = ['code'=>200,'msg'=>'删除成功']; } return json($send); }