Commit 771d3b71 authored by zhuwei's avatar zhuwei

约带看房源搜索

parent 004084f7
...@@ -22,11 +22,14 @@ class OfficeRoom extends Basic ...@@ -22,11 +22,14 @@ class OfficeRoom extends Basic
private $code = 200; private $code = 200;
private $data = []; private $data = [];
private $msg = ''; private $msg = '';
private $m_office_room;
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->service = new OfficeRoomService(); $this->service = new OfficeRoomService();
$this->m_office_room = new OfficeGRoom();
} }
/** /**
...@@ -282,4 +285,41 @@ class OfficeRoom extends Basic ...@@ -282,4 +285,41 @@ class OfficeRoom extends Basic
} }
return $this->response($this->code, $this->msg, $this->data); return $this->response($this->code, $this->msg, $this->data);
} }
/**
* 约带看房源搜索
* @return \think\Response
*/
public function getOfficeRoomByReport()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"keyword" => "vv", //1,2 external_title ,3,4internal_title
"pageNo" => 1,
"pageSize" => 15
);*/
$conditions = [];
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
if (isset($params['keyword']) && !empty($params['keyword']) ) {
$conditions['a.id|b.title'] = array("like","%" . trim($params['keyword']) . "%");
}
$conditions['a.status'] = array('eq', 1); //只显示上架
$field = 'a.id,b.title,b.address';
$result = $this->m_office_room->getRoomAgent($page_no, $page_size, $field, $conditions);
if (empty($result)) {
return $this->response("200", "此条件没有找到数据");
}
return $this->response("200", 'request success', $result);
}
} }
\ No newline at end of file
...@@ -404,7 +404,7 @@ class OfficeService ...@@ -404,7 +404,7 @@ class OfficeService
$house_img_data['image_path'] = $internet_path.$house_img_data['img_name']; $house_img_data['image_path'] = $internet_path.$house_img_data['img_name'];
} }
return $house_img_data?$house_img_data:[]; return $house_img_data?$house_img_data:null;
} }
//标签 //标签
......
...@@ -592,7 +592,6 @@ Route::group('api', [ ...@@ -592,7 +592,6 @@ Route::group('api', [
'getFindShop' => ['api/FindShop/getFindShopByParams', ['method' => 'get|post']], 'getFindShop' => ['api/FindShop/getFindShopByParams', ['method' => 'get|post']],
'getRecommendShopList' => ['api/FindShop/getRecommendShopList', ['method' => 'get|post']], 'getRecommendShopList' => ['api/FindShop/getRecommendShopList', ['method' => 'get|post']],
]); ]);
Route::group('chat', [ Route::group('chat', [
...@@ -933,6 +932,8 @@ Route::group('broker', [ ...@@ -933,6 +932,8 @@ Route::group('broker', [
'refund' => ['api_broker/PayLogOpen/refund', ['method' => 'get|post']], 'refund' => ['api_broker/PayLogOpen/refund', ['method' => 'get|post']],
'getRefund' => ['api_broker/PayLogOpen/getRefund', ['method' => 'get|post']], 'getRefund' => ['api_broker/PayLogOpen/getRefund', ['method' => 'get|post']],
]); ]);
Route::group('search', [ Route::group('search', [
...@@ -1008,6 +1009,9 @@ Route::group('office', [ ...@@ -1008,6 +1009,9 @@ Route::group('office', [
'houseFollowUpList' => ['api_broker/OfficeHomePageLog/houseFollowUpList', ['method' => 'POST|GET']], 'houseFollowUpList' => ['api_broker/OfficeHomePageLog/houseFollowUpList', ['method' => 'POST|GET']],
'collectionListByBargainId' => ['api_broker/OfficePerformance/collectionListByBargainId', ['method' => 'POST|GET']], 'collectionListByBargainId' => ['api_broker/OfficePerformance/collectionListByBargainId', ['method' => 'POST|GET']],
'getOfficeRoomByReport' => ['api_broker/OfficeRoom/getOfficeRoomByReport', ['method' => 'get|post']],
]); ]);
Route::group('office_index', [ Route::group('office_index', [
......
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