Commit 8dd63d74 authored by hujun's avatar hujun

判断

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