Commit b5fe08e7 by 刘海龙

Merge branch 'master' of http://132.232.91.252:9999/ice/eduline

parents 7b4ec59f df0e7ab5
...@@ -499,7 +499,7 @@ ...@@ -499,7 +499,7 @@
let that = this let that = this
$.ajax({ $.ajax({
type: "GET", 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", dataType: "json",
success: function (res) { success: function (res) {
if (res.status == 1) { if (res.status == 1) {
......
...@@ -106,7 +106,8 @@ class IndexAction extends Action ...@@ -106,7 +106,8 @@ class IndexAction extends Action
if ($_GET['best']) { if ($_GET['best']) {
$where['best'] = 1; $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) { 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']); $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