|
@@ -161,7 +161,7 @@ layui.use(['form','jquery'], function(){
|
|
|
if(data.info.room_id){
|
|
|
room_id = data.info.room_id;
|
|
|
|
|
|
- getQuestion(data.info.room_id, cur_question);
|
|
|
+ getQuestion(data.info.room_id);
|
|
|
|
|
|
|
|
|
}
|
|
@@ -228,7 +228,7 @@ layui.use(['form','jquery'], function(){
|
|
|
return false;
|
|
|
}
|
|
|
if(data.cur_quc == 2&&data.is_end!=1){
|
|
|
- getQuestion(room_id, cur_question);
|
|
|
+ getQuestion(room_id);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -281,9 +281,9 @@ layui.use(['form','jquery'], function(){
|
|
|
});
|
|
|
|
|
|
//获取题目
|
|
|
- var getQuestion = function getQuestion(room_id, index) {
|
|
|
+ var getQuestion = function getQuestion(room_id) {
|
|
|
var url = '/Home/Game/Question';
|
|
|
- $.get(url, {room_id:room_id, cur_question:index}, function(responsedata){
|
|
|
+ $.get(url, {room_id:room_id}, function(responsedata){
|
|
|
if(responsedata.code == 0){
|
|
|
question_id= responsedata.info.question.question_id;
|
|
|
$("#Jqtitle").html(responsedata.info.question.title );
|
|
@@ -309,6 +309,8 @@ layui.use(['form','jquery'], function(){
|
|
|
if($(".cur_answer").length > 0){
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ $(this).addClass("cur_answer");
|
|
|
answerId= answerId?answerId:$("#question .answer").eq(0).attr("data-id");//默认第一题为答案
|
|
|
var url = '/Home/Game/Answer';
|
|
|
|