瀏覽代碼

默认答案

mzx16822 6 年之前
父節點
當前提交
d0eb6af324
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      public/h5/datigame/js/common.js

+ 5 - 1
public/h5/datigame/js/common.js

@@ -8,6 +8,7 @@ common={
  		Answer:"Home/Game/Answer",
  		Join:"Home/Game/Join",
  		uid:"",
+ 		anwser_time:10,
  		option_id:0
  	},userInfo:{
 
@@ -54,7 +55,7 @@ common={
      	   $.ajax({
              type: "POST",
              url: this.data.baseurl+this.data.Answer,
-             data:{question_id:_this.data.question_id,option_id:_this.data.option_id},
+             data:{question_id:_this.data.question_id,option_id:_this.data.option_id,anwser_time:_this.data.sum},
              dataType: "json",
              success: function(data){
                    fn&&fn(data); 
@@ -226,6 +227,7 @@ common={
  			_this.data.option_id=$(this).attr("data-option_id");
  			if(!_this.data.isAnswer){
  				_this.data.isAnswer=true;
+ 				
 	 			_this.Answer(function(){
 	 			});
  			}
@@ -277,6 +279,8 @@ common={
 	        		$(".text-circle b").removeClass("rubberBand");
 	        		$(".text-circle b").removeClass("animated");
 	        	},900)
+	        }else{
+	        	html="<b class=''>"+_this.data.sum+"</b>";
 	        }
 
 	        if (_this.data.sum >= 0) textCircle.innerHTML = html;