Commit df0e7ab5 by 冷斌

fix bug

parent 630b2e3a
......@@ -498,7 +498,7 @@
let that = this
$.ajax({
type: "GET",
url: "{:U('exams/Index/paper')}" + "&api=3&search=" + that.keyword,
url: "{:U('exams/Index/paper')}" + "&all=1&api=3&search=" + that.keyword,
dataType: "json",
success: function (res) {
if (res.status == 1) {
......
......@@ -106,7 +106,8 @@ class IndexAction extends Action
if ($_GET['best']) {
$where['best'] = 1;
}
$list = D('ExamsPaper', 'exams')->getPaperPageList($where, 16, $order, true, $_GET['api']);
$pp = !empty($_GET['all']) ? 10000 : 16;
$list = D('ExamsPaper', 'exams')->getPaperPageList($where, $pp, $order, true, $_GET['api']);
foreach ($list['data'] as &$v) {
$v['paper_options'] = D('ExamsPaperOptions', 'exams')->where(['exams_paper_id'=>$v['exams_paper_id']])->field('questions_count,score')->find();//getPaperOptionsById($v['exams_paper_id']);
//判断是否需要购买 (管理员)
......
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