Переглянути джерело

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

郑晓宇 6 роки тому
батько
коміт
0fec0e245d
2 змінених файлів з 14 додано та 2 видалено
  1. 1 1
      public/h5/datigame/css/main.css
  2. 13 1
      public/h5/datigame/js/common.js

+ 1 - 1
public/h5/datigame/css/main.css

@@ -430,7 +430,7 @@ background-color:#009688;
   border-radius: .8rem 0 0 .8rem/.8rem 0 0 .8rem;
   background: #ffffff;
 }
-
+ 
 .text-circle {
   position: absolute;
   display:flex;

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

@@ -97,11 +97,12 @@ common={
           _this.loadQuestion(data);
           break;
           case 'round_end':
-
+          console.log("答题结束");
           break;
           case 'game_end':
           $(".g-doc .g-inner").addClass("end");
           $("#Jvs").hide();
+          console.log("游戏结束");
           break;
           
 
@@ -189,6 +190,17 @@ common={
 	                leftContent.setAttribute('style', 'transform: rotate(' + _this.data.angle + 'deg)')
 	            }
 	        }
+	        
+	        if(_this.data.sum<3){
+
+	        	$(".text-circle").addClass("rubberBand");
+	        	$(".text-circle").addClass("animated");
+	        	setTimeout(function(){
+	        		$(".text-circle").removeClass("rubberBand");
+	        		$(".text-circle").removeClass("animated");
+	        	},900)
+	        }
+	        
 	        if (_this.data.sum < -1) {
 	        	if(!_this.data.isAnswer)
 	           	_this.Answer();