if ($question_ids) { if ($last_answers = $this->model('answer')->get_last_answer_by_question_ids($question_ids)) { foreach ($last_answers as $key => $val) { $data_list_uids[$val['uid']] = $val['uid']; } } $topic_infos['question'] = $this->model('topic')->get_topics_by_item_ids($question_ids, 'question'); $question_infos = $this->model('question')->get_question_info_by_ids($question_ids); $question_attachs = $this->model('publish')->get_attachs('question', $question_ids, 'min');//这里新增 } if ($article_ids) { $topic_infos['article'] = $this->model('topic')->get_topics_by_item_ids($article_ids, 'article'); $article_infos = $this->model('article')->get_article_info_by_ids($article_ids); $article_attachs = $this->model('publish')->get_attachs('article', $article_ids, 'min');//这里新增 } if ($project_ids) { $topic_infos['project'] = $this->model('topic')->get_topics_by_item_ids($project_ids, 'project'); $project_infos = $this->model('project')->get_project_info_by_ids($project_ids); } $users_info = $this->model('account')->get_user_info_by_uids($data_list_uids); foreach ($posts_index as $key => $data) { switch ($data['post_type']) { case 'question': $explore_list_data[$key] = $question_infos[$data['post_id']]; $explore_list_data[$key]['answer_info'] = $last_answers[$data['post_id']]; if ($explore_list_data[$key]['answer_info']) { $explore_list_data[$key]['answer_info']['user_info'] = $users_info[$last_answers[$data['post_id']]['uid']]; } $explore_list_data[$key]['attachs'] = $question_attachs[$data['post_id']];//这里新增 break; case 'article': $explore_list_data[$key] = $article_infos[$data['post_id']]; $explore_list_data[$key]['attachs'] = $article_attachs[$data['post_id']];//这里新增 break;
这家伙很懒,还没有设置简介