Commit a829911d authored by hujun's avatar hujun

删除图片修改

parent 9972c815
......@@ -338,13 +338,14 @@ class Shop extends Basic
$data['data'] = '';
if(empty($this->params['save_path']) || empty($this->params['house_id'])){
return $this->response($data['status'], 'Save_path or id house_id null', $data['data']);
return $this->response($data['status'], 'Save_path or id house_id is null', $data['data']);
}
$img = new GHousesImgs();
$id = $img->getHouseImagesInfo('id',[
'house_id' => $this->params['house_id'],
'img_name' => $this->params['save_path']
'img_name' => $this->params['save_path'],
'img_status' => 0
]);
if (empty($id['id'])) {
......@@ -352,7 +353,7 @@ class Shop extends Basic
} else {
$path = ROOT_PATH . 'public' . DS . 'resource'. DS . 'lib'. DS .'Attachments'. DS .'Images/';
@unlink($path.$this->params['save_path']);
$img->editData(['img_status'=>1],$this->params['house_id'], 'id');
$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