瀏覽代碼

Merge branch 'master' of http://120.78.169.79:3000/zhengxiaoyu/datiGame

郑晓宇 6 年之前
父節點
當前提交
de8478b11a
共有 1 個文件被更改,包括 11 次插入2 次删除
  1. 11 2
      public/h5/datigame/js/common.js

+ 11 - 2
public/h5/datigame/js/common.js

@@ -92,9 +92,18 @@ common={
           	if($(this).attr("option_id")==data.info.anwser){
           		$(this).addClass("cur_true");
           	}
-          	if($(this).attr("option_id")==_this.data.player_answerId){
+          	if($(this).attr("option_id")!=data.info.anwser&&$(this).hasClass("cur_answer")){
+          		
+          		$(this).addClass("cur_error");
+          	}
+          	
+          	if($(this).attr("option_id")==_this.data.player_answerId&&$(this).attr("option_id")==data.info.anwser){
+          		//对方答案
+          		$(this).addClass("player_true");
+          	}
+          	if($(this).attr("option_id")==_this.data.player_answerId&&$(this).attr("option_id")!=data.info.anwser){
           		//对方答案
-          		$(this).addClass("player_cur");
+          		$(this).addClass("player_error");
           	}
            
           })