Commit cefa8518 authored by clone's avatar clone

1

parent fa47d252
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api\service; namespace app\api\service;
use app\model\OfficeGBuildingStations; use app\model\OfficeGBuildingStations;
use app\model\OfficeGImg;
use app\model\OfficeGRoom; use app\model\OfficeGRoom;
/** /**
...@@ -101,6 +102,8 @@ class OfficeRoomApiService ...@@ -101,6 +102,8 @@ class OfficeRoomApiService
} }
$result_data = []; $result_data = [];
$gRoomImgModel = new OfficeGImg();
foreach ($data as $k => $v) { foreach ($data as $k => $v) {
$tmp['id'] = $v['id']; $tmp['id'] = $v['id'];
$tmp['price'] = empty($v['price']) ? 0 : $v['price'] / 100; $tmp['price'] = empty($v['price']) ? 0 : $v['price'] / 100;
...@@ -110,7 +113,12 @@ class OfficeRoomApiService ...@@ -110,7 +113,12 @@ class OfficeRoomApiService
$tmp['is_rent'] = $v['is_rent']; $tmp['is_rent'] = $v['is_rent'];
$area = $this->MinField($v['building_id'], 'area'); $area = $this->MinField($v['building_id'], 'area');
$tmp['title'] = $v['disc'] . ' ' . $v['business_name'] . ' ' . $v['title'] . ' ' . $area . '㎡'; $tmp['title'] = $v['disc'] . ' ' . $v['business_name'] . ' ' . $v['title'] . ' ' . $area . '㎡';
$result_data[] = $tmp;
$tmp['api_path'] = CK_IMG_URL . 'images/';
$house_img_where["house_id"] = $v["id"];
$house_img_where["img_type"] = 2;
$tmp["images"] = $gRoomImgModel->getCoverImage('id,img_name', $where);
$result_data[] = $tmp;
} }
$result['status'] = 'successful'; $result['status'] = 'successful';
$result['data'] = $result_data; $result['data'] = $result_data;
......
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