Commit 35d0c633 by 冷斌

fix bug

parent cdeaa3c3
......@@ -53,7 +53,9 @@ class IndexAction extends CommonAction
'_string' =>'(`start_time` <= ' . time() . ' OR `start_time` = 0) AND (`end_time` >= ' . time() . ' OR `end_time` = 0)',
'best' => 1,
];
$list = D('ExamsPaper', 'exams')->getPaperPageList($where, 16, 'default', true);
$list = D('ExamsPaper', 'exams')->getPaperPageList($where, 16, 'default', true, 3);
var_dump($list);
die;
$this->assign('exams', $list);
if ($config['tpl'] == 'theme_x4') {
$info_data = $this->get_index_one_data($config['item']);
......
......@@ -44,6 +44,10 @@ class ExamsPaperModel extends Model
if ((int)$isApi === 2) {
$map['_string'] .= ' AND attachment > 0';
}
if ((int)$isApi === 3) {
$this->selectAdd('( SELECT exams_paper_id from el_exams_paper_options WHERE el_exams_paper_options.exams_paper_id = el_exams_paper.exams_paper_id) as abc');
}
$order = isset($this->order_field[$order]) ? $this->order_field[$order] : $order;
$list = $this->where($map)->order($order)->findPage($limit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment