Commit 062c9838 authored by hujun's avatar hujun

位置调整

parent 16207c35
......@@ -942,14 +942,6 @@ class GHouses extends BaseModel
$params['internal_title'] = trim($params['internal_title']);
}
//新增或编辑
if (empty($params['id'])) {
$params['upload_id'] = $agent_id;
$this->allowField(true)->save($params);
$house_id = $this->id;
$result['house_id'] = $this->id;
$result['internal_title'] = $params['internal_title'];
if ($params['image_file']) {
$m_img = new GHousesImgs();
$image_file = json_decode($params['image_file'], true);
......@@ -964,6 +956,13 @@ class GHouses extends BaseModel
$m_img->addHouseImgAll($img_data);
}
//新增或编辑
if (empty($params['id'])) {
$params['upload_id'] = $agent_id;
$this->allowField(true)->save($params);
$house_id = $this->id;
$result['house_id'] = $this->id;
$result['internal_title'] = $params['internal_title'];
} else {
$house_data = $this->field('id,internal_title,residue_num,total')->where('id', $params['id'])->where('status', '<>', 3)->find();
if (!empty($house_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