Commit 5069831d authored by hujun's avatar hujun

删除图片返回信息

parent 15508548
......@@ -367,21 +367,19 @@ class Houses extends Basic
$data['msg'] = '';
$data['data'] = '';
if (empty($this->params['save_path']) || empty($this->params['house_id'])) {
return $this->response($data['status'], 'Save_path or id house_id is null', $data['data']);
if (empty($this->params['id'])) {
return $this->response($data['status'], '参数错误', $data['data']);
}
$img = new GHousesImgs();
$id = $img->getHouseImagesInfo('id', [
'house_id' => $this->params['house_id'],
'img_name' => $this->params['save_path'],
'id' => $this->params['house_id'],
'img_status' => 0
]);
if (empty($id['id'])) {
$data['msg'] = '没有该文件';
} else {
$path = ROOT_PATH . 'public' . DS . 'resource' . DS . 'lib' . DS . 'Attachments' . DS . 'Images/';
$img->editData([ 'img_status' => 1 ], $id['id'], 'id');
$data['status'] = 200;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment