public function DeletePicture() { $ids = array_unique((array) I('ids', null)); if (empty($ids)) { return $this->error('请选择要删除行!'); } $data = array('id' => array('in', $ids)); $model = new HeadPictureManagementModel(); $res = $model->where($data)->delete(); if (!$res) { $this->error("删除图片失败"); } else { $this->success('删除成功!', addons_url('WeVote:/HeadPictureManagement/Index', array('action_id' => $this->mActionId))); } }