Commit ab03d315 authored by hujun's avatar hujun

处理商铺列表空数据

parent d92e6617
......@@ -250,9 +250,16 @@ class Houses extends Basic
if (!empty($agent_where)) {
$m_to_agent = new GHousesToAgents();
$agent_arr = $m_to_agent->getAgentsHouseField('houses_id', $agent_where);
if (empty($agent_arr)) {
$data['data']['list'] = [];
$data['data']['total'] = 0;
return $this->response(200, '', $data);
} else {
$agent_str = implode(',', $agent_arr);
$where[] = ['EXP', "id in ({$agent_str})"];
}
}
/*房东手机号搜索*/
if ($this->params['landlord_phone'] != NULL) {
......@@ -263,7 +270,11 @@ class Houses extends Basic
$house_ext_where['landlord_phone'] = ['LIKE','%'.$this->params['landlord_phone'].'%'];
$landlord_arr = $m_house_ext->getList(1,1000, '', 'house_id', $house_ext_where);
if (!empty($landlord_arr)) {
if (empty($landlord_arr)) {
$data['data']['list'] = [];
$data['data']['total'] = 0;
return $this->response(200, '', $data);
} else {
foreach ($landlord_arr as $k=>$v) {
$landlord_house_id[] = $v['house_id'];
}
......
......@@ -35,7 +35,7 @@ class Remark extends Basic
$data['status'] = 200;
$data['msg'] = '';
$where_user = $agent_where = [];
$agent_where = [];
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
......
......@@ -101,7 +101,7 @@
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
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