diff --git a/application/controllers/information.php b/application/controllers/information.php index 17d6dc2f..8a30f117 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -767,7 +767,7 @@ class Information extends CI_Controller ); $data['info_topthings'] = $this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]); if (!empty($data['info_topthings'])) { - $data['info_topthings_root'] = $data['root_detail']; + $data['info_topthings_root'] =$this->Information_model->get_detail_by_path($data['info_topthings']->is_path, 1); $data['info_topthings']->ic_photo = $this->set_photo_content($data['info_topthings']->ic_photo, $data['info_topthings']->ic_content); } //文化板块的页面,随机挑选一篇 @@ -784,7 +784,7 @@ class Information extends CI_Controller ); $data['info_hotel'] = $this->Information_model->Detail($random_array[rand(0, count($random_array) - 1)]); if (!empty($data['info_hotel'])) { - $data['info_hotel_root'] = $data['root_detail']; + $data['info_hotel_root'] = $this->Information_model->get_detail_by_path($data['info_hotel_root']->is_path, 1); $data['info_hotel']->ic_photo = $this->set_photo_content($data['info_hotel']->ic_photo, $data['info_hotel']->ic_content); } break;