From 01e8be5d764bec33de3a6c2fe47c28afbbca4cec Mon Sep 17 00:00:00 2001 From: ahbmz Date: Mon, 30 Jan 2023 15:36:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=85=B1=E4=BA=AB=E6=88=BF?= =?UTF-8?q?=E6=BA=90=E5=9B=BE=E7=89=87=E6=94=B9=E6=88=90=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=AD=90=E6=88=BF=E6=BA=90=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Index.php | 7 +++++-- weapp/xunxibao/pages/index/index.wxml | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 5c40eef..e7eb660 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -126,7 +126,7 @@ class Index extends Controller $pagesize = $this->request->param('pagesize', 10, 'filter_danger_str'); $pages = ceil($count / $pagesize); //总页数 $_db->page($page, $pagesize)->order('r.id', "DESC"); - $field = 'r.*,h.apartment,h.id AS house_id,h.name,h.name,h.photo,h.province,h.city,h.area,h.door_number,h.floor_num,m.phone'; + $field = 'r.*,h.apartment,h.id AS house_id,h.name,h.name,h.photo AS h_photo,h.province,h.city,h.area,h.door_number,h.floor_num,m.phone'; $_result = $_db->field($field)->select(); self::formatRoomData($_result); $_data['list'] = $_result; @@ -181,8 +181,11 @@ class Index extends Controller !empty($v['end_time']) ? $v['end_time'] = date('Y-m-d', $v['end_time']) : $v['end_time'] = ''; !empty($v['start_time']) ? $v['start_time'] = date('Y-m-d', $v['start_time']) : $v['start_time'] = ''; isset($v['sex']) ? $v['sex'] = config('sex')[$v['sex']] : ''; - //列表封面 + //列表子房间封面 if (isset($v['photo'])) { + if(empty($v['photo'])){ + $v['photo'] = $v['h_photo']; //赋值母房源图片 + } $_arr = explode(',', $v['photo']); $v['thumb'] = !empty($_arr[0]) ? $_arr[0] : config('default_list_thumb'); } diff --git a/weapp/xunxibao/pages/index/index.wxml b/weapp/xunxibao/pages/index/index.wxml index 4c545be..c4ebe80 100644 --- a/weapp/xunxibao/pages/index/index.wxml +++ b/weapp/xunxibao/pages/index/index.wxml @@ -99,18 +99,18 @@ 全部 - + + 附近1公里 + + 附近2公里 - + 附近3公里 - + 附近4公里 - - 附近5公里 -