diff --git a/application/controllers/information.php b/application/controllers/information.php
index caa3be4a..b6a6dc99 100644
--- a/application/controllers/information.php
+++ b/application/controllers/information.php
@@ -987,7 +987,7 @@ class Information extends CI_Controller
{
$information = $this->Information_model->Detail($this->input->get('is_id'));
$recommand_information = $this->recommand_information($information);
- var_dump($recommand_information);
+ // var_dump($recommand_information);
$tips_right_a = [];
$tips_right_b = [];
$tips_right_c = [];
@@ -1521,26 +1521,38 @@ class Information extends CI_Controller
$template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template);
}
// 右侧列表广告
- $tipsRightList = [];
- for ($i=1; $i <= 36; $i++) {
- $key = 'List Tips Right '.$i;
+ $tips_right_a = [];
+ $tips_right_b = [];
+ $tips_right_c = [];
+ for ($i=1; $i <= 12; $i++) {
+ $key = 'List Tips Right A_'.$i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
- $tipsRightList[] = $recommand_information[$key];
+ $tips_right_a[] = $recommand_information[$key];
+ }
+ }
+ for ($i=1; $i <= 12; $i++) {
+ $key = 'List Tips Right B_'.$i;
+ if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
+ $tips_right_b[] = $recommand_information[$key];
+ }
+ }
+ for ($i=1; $i <= 12; $i++) {
+ $key = 'List Tips Right C_'.$i;
+ if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
+ $tips_right_c[] = $recommand_information[$key];
}
}
- if (!empty($tipsRightList)) {
- $tips_right_list_content = $this->load->view(
- 'mobile_first/ah-tips-right-list',
- array(
- 'tips_right_first' => array_slice($tipsRightList, 0, 12),
- 'tips_right_second' => array_slice($tipsRightList, 12, 12),
- 'tips_right_third' => array_slice($tipsRightList, 24, 12)),
- true
- );
+ $tips_right_list_content = $this->load->view(
+ 'mobile_first/ah-tips-right-list',
+ array(
+ 'tips_right_a' => $tips_right_a,
+ 'tips_right_b' => $tips_right_b,
+ 'tips_right_c' => $tips_right_c),
+ true
+ );
- $template = str_replace('', $tips_right_list_content, $template);
- }
+ $template = str_replace('', $tips_right_list_content, $template);
//文中的信息推荐
if (strpos($information->ic_content, '') !== false) {