Commit 96cc912f authored by hujun's avatar hujun

图片

parent dba28bb0
......@@ -157,7 +157,7 @@ class HouseService
}
}
if ($data['id'] == '') {
if (empty($data['id'])) {
$house_img->add($data, $house_id); //只记录新增图片
} else {
$image_result = $house_img->edit($data, $house_id); //编辑图片
......
......@@ -34,7 +34,7 @@ class GHousesImgs extends BaseModel
}
//2详情页轮播图
if ($params['slide_show']) {
if (!empty($params['slide_show'])) {
foreach ($params['slide_show'] as $k => $v) {
if (empty($v)) {
continue;
......@@ -47,7 +47,7 @@ class GHousesImgs extends BaseModel
}
//3楼层平面图
if ($params['plan']) {
if (!empty($params['plan'])) {
foreach ($params['plan'] as $kk => $vv) {
if (empty($vv)) {
continue;
......@@ -60,7 +60,7 @@ class GHousesImgs extends BaseModel
}
//4独家合同
if ($params['exclusive_img']) {
if (!empty($params['exclusive_img'])) {
foreach ($params['exclusive_img'] as $kk => $vv) {
if (empty($vv)) {
continue;
......@@ -73,7 +73,10 @@ class GHousesImgs extends BaseModel
}
try {
$result['data'] = $this->saveAll($insert_img);
if (!empty($insert_img)) {
$result['data'] = $this->saveAll($insert_img);
}
$result['status'] = 'successful';
} catch (\Exception $e) {
$result['status'] = 'fail';
......
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