Commit 50583724 authored by clone's avatar clone

获取商铺信息

parent 7e177a61
...@@ -313,16 +313,13 @@ class AppChat extends Basic ...@@ -313,16 +313,13 @@ class AppChat extends Basic
if (!isset($params['id']) || !isset($params['from'])) { if (!isset($params['id']) || !isset($params['from'])) {
return $this->response("300", "参数不全"); return $this->response("300", "参数不全");
} }
$conditions['id'] = array( "eq", $params["id"] ); $conditions['id'] = array( "eq", $params["id"] );
$gHousesModel = new GHouses(); $gHousesModel = new GHouses();
//internal_title c端 //internal_title c端
if ($params["from"] == "b") { if ($params["from"] == "b") {
$field = "id,external_title as title,shop_area_start,shop_area_end,rent_type,rent_price"; $field = "id,external_title as title,shop_area_start,shop_area_end,rent_type,rent_price,shop_type";
} else { } else {
$field = "id,internal_title as title,shop_area_start,shop_area_end,rent_type,rent_price"; $field = "id,internal_title as title,shop_area_start,shop_area_end,rent_type,rent_price,shop_type";
} }
$result = $gHousesModel->getHouseInfoById($field, $conditions); $result = $gHousesModel->getHouseInfoById($field, $conditions);
...@@ -351,6 +348,13 @@ class AppChat extends Basic ...@@ -351,6 +348,13 @@ class AppChat extends Basic
break; break;
} }
$result['price'] = $message; $result['price'] = $message;
if ($result["shop_type"] == 0) {
$result['room_area_all'] = $result['shop_area_start'] . '-' . $result['shop_area_end'] . 'm²';
} else {
$result['room_area_all'] = $result['shop_area_start'] . 'm²';
}
return $this->response("200", "success!", $result); return $this->response("200", "success!", $result);
} else { } else {
return $this->response("400", "暂无数据!"); return $this->response("400", "暂无数据!");
......
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