Bladeren bron

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

郑晓宇 6 jaren geleden
bovenliggende
commit
de8478b11a
1 gewijzigde bestanden met toevoegingen van 11 en 2 verwijderingen
  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");
           	}
            
           })