|
|
|
@ -410,12 +410,14 @@ class Information extends CI_Controller
|
|
|
|
|
} else if (strcasecmp($site_code, "ch") == 0 && !empty($auto_update_cache)) {
|
|
|
|
|
//读取模板生成PC和移动优先文件
|
|
|
|
|
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
|
|
|
|
|
//$this->benchmark->mark('000');
|
|
|
|
|
$recommand_information = $this->recommand_information($information);
|
|
|
|
|
//$this->benchmark->mark('111');
|
|
|
|
|
$this->make_www_cache('mobile', $information_new, $recommand_information);
|
|
|
|
|
//$this->benchmark->mark('222');
|
|
|
|
|
$this->make_www_cache('pc', $information_new, $recommand_information);
|
|
|
|
|
//echo $this->benchmark->elapsed_time('111', '222');
|
|
|
|
|
//echo ' |000~111: '.$this->benchmark->elapsed_time('000', '111');
|
|
|
|
|
//echo ' |111~222: '.$this->benchmark->elapsed_time('111', '222');
|
|
|
|
|
} else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) {
|
|
|
|
|
//读取模板生成PC和移动优先文件
|
|
|
|
|
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
|
|
|
|
@ -873,7 +875,6 @@ class Information extends CI_Controller
|
|
|
|
|
$template = $this->html_optimize_lib->set_image_size($template);
|
|
|
|
|
}
|
|
|
|
|
// /travelguide/chinese-zodiac/monthly-fortune-for-dog.htm
|
|
|
|
|
$this->benchmark->mark('10');
|
|
|
|
|
$html_path = $this->config->item('cache')[$this->config->item('site_code')]['cache_path'] . $information->ic_url;
|
|
|
|
|
$html_path = str_replace("\\", "/", $html_path);
|
|
|
|
|
if (substr($html_path, -1, 1) == '/') {
|
|
|
|
@ -1401,7 +1402,7 @@ class Information extends CI_Controller
|
|
|
|
|
$data = $this->Information_model->random(1, $root_information->is_path, $exclude_ids);
|
|
|
|
|
break;
|
|
|
|
|
case 'rule_this_node_random'://指定节点下随机
|
|
|
|
|
$ir_pointer = $this->Information_model->Detail($recommand->ir_pointer_is_id);
|
|
|
|
|
$ir_pointer = $this->Information_model->Detail($recommand->ir_pointer_is_id,'is_path');
|
|
|
|
|
if (!empty($ir_pointer)) {
|
|
|
|
|
$data = $this->Information_model->random(1, $ir_pointer->is_path, $exclude_ids);
|
|
|
|
|
}
|
|
|
|
@ -1450,7 +1451,6 @@ class Information extends CI_Controller
|
|
|
|
|
$root_recommands = $this->recommends_and_tips_model->recommends_list($root_detail->is_id);//节点下所有的推荐规则
|
|
|
|
|
|
|
|
|
|
$exclude_ids = array($information->is_id);//需要排除的is_id,防止通过页面显示相同内容,默认排除本身,每个推荐内容都需要排除已经推荐过的
|
|
|
|
|
|
|
|
|
|
foreach ($root_recommands as $item) {
|
|
|
|
|
$result = $this->recommand_information_rule($information, $root_detail, $item, $exclude_ids);
|
|
|
|
|
if (!empty($result)) {
|
|
|
|
|