Commit 228b5371 by 冷斌

fix bug

parent 4c19d727
......@@ -337,6 +337,12 @@ class IndexAction extends Action
// 是否收藏
$paper['iscollect'] = D('ZyCollection', 'classroom')->isCollect($paper_id, 'exams_paper', intval($this->mid));
$limit = 0;
if (!$paper['is_buy']) {
$limit = 3;
}
$this->assign('limit', $limit);
$this->assign('paper', $paper);
// 是否练习模式
$this->assign('isPractice', ($_GET['joinType'] == 1) ? 1 : 2);
......
......@@ -282,6 +282,8 @@
var isCollect = "{$paper['iscollect']}" > 0 ? 1 : 0;
var limit = "{$limit}";
function changeCollect() {
if (isCollect) {
isCollect = 0;
......
......@@ -51,11 +51,16 @@ $(function() {
});
// 下一题
$(".next_question,.go_question").click(function() {
if ($(this).hasClass("go_question")) {
var question_num = parseInt($(this).data("question_num"));
} else {
var question_num = parseInt($(this).data("question_num")) + 1;
}
console.log(limit, question_num);
$(".answer-card").hide();
if ($("#ex" + question_num).length > 0) {
$("#ex" + question_num).show().siblings().hide();
......@@ -239,4 +244,4 @@ $(function() {
t = startTime();
}
});
})
\ No newline at end of file
})
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