Commit e955c5d8 authored by hujun's avatar hujun

位置调整

parent 062c9838
......@@ -942,19 +942,6 @@ class GHouses extends BaseModel
$params['internal_title'] = trim($params['internal_title']);
}
if ($params['image_file']) {
$m_img = new GHousesImgs();
$image_file = json_decode($params['image_file'], true);
$img_data = [];
foreach ($image_file as $k=>$v) {
$img_data[$k]['house_id'] = $this->id;
$img_data[$k]['img_name'] = $v['img_name'];
$img_data[$k]['img_type'] = $v['img_type'];
}
$m_img->addHouseImgAll($img_data);
}
//新增或编辑
if (empty($params['id'])) {
......@@ -1106,6 +1093,20 @@ class GHouses extends BaseModel
$agents->addAgents($params['exclusive_ids'], $house_id, 3);
}
if ($params['image_file']) {
$m_img = new GHousesImgs();
$image_file = json_decode($params['image_file'], true);
$img_data = [];
foreach ($image_file as $k=>$v) {
$img_data[$k]['house_id'] = $result['house_id'];
$img_data[$k]['img_name'] = $v['img_name'];
$img_data[$k]['img_type'] = $v['img_type'];
}
$m_img->addHouseImgAll($img_data);
}
if ($result['house_id'] != NULL) {
$this->commit();
} else {
......
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