Commit 8dd63d74 authored by hujun's avatar hujun

判断

parent 35f459e5
......@@ -79,11 +79,13 @@ class HouseService
}
try {
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'])) {
$house_data = $this->m_house->getHouseInfo('id,internal_address,internal_title', ['id' => $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,10 +144,18 @@ class HouseService
//商铺图片
if ($is_app == 1) {
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'] == '') {
$house_img->add($data, $house_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