Commit 8dd63d74 authored by hujun's avatar hujun

判断

parent 35f459e5
...@@ -79,10 +79,12 @@ class HouseService ...@@ -79,10 +79,12 @@ class HouseService
} }
try { try {
if ($is_app == 1) { if (isset($data['landlord_phone'])) {
$landlord_phone_new = json_decode($data['landlord_phone'], true); if ($is_app == 1) {
} else { $landlord_phone_new = json_decode($data['landlord_phone'], true);
$landlord_phone_new = $data['landlord_phone']; } else {
$landlord_phone_new = $data['landlord_phone'];
}
} }
if (!empty($data['id'])) { if (!empty($data['id'])) {
...@@ -111,7 +113,7 @@ class HouseService ...@@ -111,7 +113,7 @@ class HouseService
$remark .= ',地址改为:' . $data['internal_address']; $remark .= ',地址改为:' . $data['internal_address'];
} }
if ($landlord_phone_new) { if (!empty($landlord_phone_new)) {
$landlord_phone_old = $this->landlordPhoneEdit($landlord_phone_new, $data['id']); $landlord_phone_old = $this->landlordPhoneEdit($landlord_phone_new, $data['id']);
if (!empty($landlord_phone_old)) { if (!empty($landlord_phone_old)) {
...@@ -131,7 +133,7 @@ class HouseService ...@@ -131,7 +133,7 @@ class HouseService
} }
//新增房东手机号 //新增房东手机号
if (empty($data['id'])) { if (empty($data['id']) && !empty($landlord_phone_new)) {
$this->landlordPhoneEdit($landlord_phone_new, $house_id); $this->landlordPhoneEdit($landlord_phone_new, $house_id);
} }
...@@ -142,9 +144,17 @@ class HouseService ...@@ -142,9 +144,17 @@ class HouseService
//商铺图片 //商铺图片
if ($is_app == 1) { if ($is_app == 1) {
$data['cover'] = json_decode($data['cover'], true); if (isset($data['cover'])) {
$data['slide_show'] = json_decode($data['slide_show'], true); $data['cover'] = json_decode($data['cover'], true);
$data['exclusive_img'] = json_decode($data['exclusive_img'], true); }
if (isset($data['slide_show'])) {
$data['slide_show'] = json_decode($data['slide_show'], true);
}
if (isset($data['exclusive_img'])) {
$data['exclusive_img'] = json_decode($data['exclusive_img'], true);
}
} }
if ($data['id'] == '') { if ($data['id'] == '') {
......
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