Commit 50583724 authored by clone's avatar clone

获取商铺信息

parent 7e177a61
......@@ -306,23 +306,20 @@ class AppChat extends Basic
public function getHouseInfoByFrom()
{
$params = $this->params;
/* $params = array(
'id' => 3,
'from' => 'b'
);*/
/* $params = array(
'id' => 3,
'from' => 'b'
);*/
if (!isset($params['id']) || !isset($params['from'])) {
return $this->response("300", "参数不全");
}
$conditions['id'] = array( "eq", $params["id"] );
$gHousesModel = new GHouses();
$gHousesModel = new GHouses();
//internal_title c端
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 {
$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);
......@@ -351,6 +348,13 @@ class AppChat extends Basic
break;
}
$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);
} else {
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