|
@@ -104,11 +104,13 @@ layui.use(['form','jquery'], function(){
|
|
|
|
|
|
function daoshu(argument) {
|
|
|
clearInterval(ts)
|
|
|
+ sum=5;
|
|
|
ts=setInterval(function(){
|
|
|
|
|
|
sum= sum-1;
|
|
|
$("#Jvs").html(sum);
|
|
|
if(sum<=0){
|
|
|
+ cur_question++;
|
|
|
getQuestion(room_id, cur_question);
|
|
|
sum=5;
|
|
|
}
|
|
@@ -160,7 +162,7 @@ layui.use(['form','jquery'], function(){
|
|
|
room_id = data.info.room_id;
|
|
|
|
|
|
getQuestion(data.info.room_id, cur_question);
|
|
|
- daoshu();
|
|
|
+
|
|
|
|
|
|
}
|
|
|
break;
|
|
@@ -187,6 +189,7 @@ layui.use(['form','jquery'], function(){
|
|
|
//结算
|
|
|
clearInterval(ts)
|
|
|
$(".g-doc .g-inner").addClass("end");
|
|
|
+ $("#Jvs").html("已结束");
|
|
|
|
|
|
var url = 'Quit';
|
|
|
if(py1_score > py2_score){
|
|
@@ -289,7 +292,7 @@ layui.use(['form','jquery'], function(){
|
|
|
$("#question").html(question);
|
|
|
$("#Jpage").html(responsedata.info.questions_count)
|
|
|
// is_end = responsedata.info.question.is_end;
|
|
|
- clearInterval(ts)
|
|
|
+ daoshu();
|
|
|
}else{
|
|
|
layer.msg(responsedata.msg, {
|
|
|
time: 1000 //2秒关闭(如果不配置,默认是3秒)
|
|
@@ -302,12 +305,13 @@ layui.use(['form','jquery'], function(){
|
|
|
if($(".cur_answer").length > 0){
|
|
|
return false;
|
|
|
}
|
|
|
- clearInterval(ts)
|
|
|
+
|
|
|
var url = '/Home/Game/Answer';
|
|
|
var answer = $(this).data("id");
|
|
|
$(this).addClass("cur_answer");
|
|
|
- $.post(url, {answer:answer,cur_question:cur_question,room_id:room_id,client_id:client_id,is_end:is_end,question_id:question_id}, function(responsedata){
|
|
|
+ $.post(url, {option_id:answer,cur_question:cur_question,room_id:room_id,client_id:client_id,is_end:is_end,question_id:question_id}, function(responsedata){
|
|
|
console.log(responsedata);
|
|
|
+ clearInterval(ts)
|
|
|
});
|
|
|
cur_question = cur_question + 1;
|
|
|
});
|