根据类别调试推荐信息

hotfix/paypal-note
Jimmy Liow 2 years ago
parent e33eb2bc94
commit c15317f181

@ -988,21 +988,31 @@ class Information extends CI_Controller
$information = $this->Information_model->Detail($this->input->get('is_id')); $information = $this->Information_model->Detail($this->input->get('is_id'));
$recommand_information = $this->recommand_information($information); $recommand_information = $this->recommand_information($information);
var_dump($recommand_information); var_dump($recommand_information);
$tipsRightList = []; $tips_right_first = [];
for ($i=1; $i <= 36; $i++) { $tips_right_second = [];
$key = 'List Tips Right '.$i; $tips_right_third = [];
for ($i=1; $i <= 12; $i++) {
$key = 'List Tips Right A_'.$i;
if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) { if (array_key_exists($key, $recommand_information) && $recommand_information[$key]) {
$tipsRightList[] = $recommand_information[$key]; $tips_right_first[] = $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_second[] = $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_third[] = $recommand_information[$key];
} }
} }
$firstList = array_slice($tipsRightList, 0, 12); echo 'List Tips Right A: '.COUNT($tips_right_first);
$secondList = array_slice($tipsRightList, 12, 12); echo '; List Tips Right B: '.COUNT($tips_right_second);
$thirdList = array_slice($tipsRightList, 24, 12); echo '; List Tips Right C: '.COUNT($tips_right_third);
echo 'COUNT: '.COUNT($tipsRightList);
echo '; 1 COUNT: '.COUNT($firstList);
echo '; 2 COUNT: '.COUNT($secondList);
echo '; 3 COUNT: '.COUNT($thirdList);
$tips_right_list_content = $this->load->view( $tips_right_list_content = $this->load->view(
'mobile_first/ah-tips-right-list', 'mobile_first/ah-tips-right-list',

Loading…
Cancel
Save