Commit ecccf574 authored by liuqiao's avatar liuqiao

出售房源列表封面图

parent f1ec094c
......@@ -4128,7 +4128,7 @@ class Sell extends MY_Controller {
'streetid', 'blockid', 'isreal', 'blockshowname', 'buildyear', 'buildarea',
'subfloor', 'floor', 'totalfloor', 'room', 'hall', 'toilet', 'kitchen', 'balcony',
'forward', 'price', 'averprice', 'priceterm', 'pricetype', 'fitment', 'contactor',
'telno', 'creattime', 'updatetime', 'expiretime', 'isstar', 'istag', 'nofee', 'is360', 'is_real_house','vr_model_id');
'telno', 'creattime', 'updatetime', 'expiretime', 'isstar', 'istag', 'nofee', 'is360', 'is_real_house','vr_model_id','pic1');
$this->sell_model->set_select_fields($select_fields);
$data_info = $this->sell_model->find_all_by( $cond_where , $this->_offset ,
......@@ -4256,7 +4256,9 @@ class Sell extends MY_Controller {
}
else
{
for( $i = 0 ; $i < $row_num ; $i ++ )
$this->load->model('pic_model');
for( $i = 0 ; $i < $row_num ; $i ++ )
{
//房源地址
$data_info[$i]['info_url'] = get_sellinfo_url($data_info[$i]['id']);
......@@ -4432,6 +4434,13 @@ class Sell extends MY_Controller {
}
}
// 封面图
$pic1 = $data_info[$i]['pic1'] ? $data_info[$i]['pic1'] : '';
if (!$pic1) {
$housePics = $this->pic_model->find_house_pic_by('sell', $data_info[$i]['id']);
$data_info[$i]['pic1'] = $housePics ? $housePics[0]['filename'] : STATIC_SOURCE_URL.'/zsb/images/v1.0/default.jpg';
}
$arr_rowid[] = $data_info[$i]['id'];
}
......
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