mzx16822 il y a 6 ans
Parent
commit
123f550408
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      public/h5/datigame/js/common.js

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

@@ -169,8 +169,8 @@ common={
 	    leftContent.setAttribute('style', 'transform: rotate(0deg)');
 	    rightContent.setAttribute('style', 'transform: rotate(0deg)');
 	    this.data.ts = setInterval(function() {
-	        if (sum >= 0) textCircle.innerHTML = sum;
-	        sum = sum - 1;
+	        if (this.data.sum >= 0) textCircle.innerHTML = this.data.sum;
+	        this.data.sum = this.data.sum - 1;
 	        $("#Jvs .con").show();
 	        $("#Jvs .tit").html("抢答中");
 	        angle += 36;
@@ -181,10 +181,10 @@ common={
 	                leftContent.setAttribute('style', 'transform: rotate(' + angle + 'deg)')
 	            }
 	        }
-	        if (sum < -1) {
+	        if (this.data.sum < -1) {
 	            answer();
-	            sum = 9;
-	            angle = 0;
+	            this.data.sum = 9;
+	            this.data.angle = 0;
 	            leftContent.setAttribute('style', 'transform: rotate(0deg)');
 	            rightContent.setAttribute('style', 'transform: rotate(0deg)')
 	        }