Fruit of Eden 6 years ago
parent
commit
b386d53bce
1 changed files with 16 additions and 15 deletions
  1. 16 15
      js/common.js

+ 16 - 15
js/common.js

@@ -5,11 +5,11 @@ function load_table_red_rank1() {
     get_data("fcBiWorkerDaily/get?type=2&limit=3", on_red_rank_success1);
 }
 function load_table_black_rank1() {
-    get_data("fcBiWorkerDaily/get?type=0&limit=3", on_black_rank_success1);
+    get_data("fcBiWorkerDaily/get?type=3&limit=3", on_black_rank_success1);
 
 }
 function load_table_black_rank() {
-    get_data("fcBiWorkerDaily/get?type=4&limit=3", on_black_rank_success);
+    get_data("fcBiWorkerDaily/get?type=0&limit=3", on_black_rank_success);
 
 }
 
@@ -307,7 +307,6 @@ function getSpotHtml4(htmlbody, i) {
     }else {
         htmlbody += `<tr style="background-color: ${badColor1[i]}">
                     <td>${badid1[i]}</td>
-                    
                     <td>${badfailrate1[i] + '%'}</td>
                 </tr>`;
     }
@@ -315,9 +314,11 @@ function getSpotHtml4(htmlbody, i) {
     return htmlbody;
 }
 
+var lastTimeRank0 = "";
 var lastTimeRank1 = "";
 var lastTimeRank2 = "";
 var lastTimeRank3 = "";
+var lastTimeRank4 = "";
 
 function showEachSpot() {
     var htmlbody = "", one_person = "";
@@ -328,9 +329,9 @@ function showEachSpot() {
 
         htmlbody = getSpotHtml(htmlbody, i);
     }
-    if(lastTimeRank1 !== htmlbody) {
+    if(lastTimeRank0 !== htmlbody) {
         $("#rank-one").html(htmlbody);
-        lastTimeRank1 = htmlbody;
+        lastTimeRank0 = htmlbody;
     }
     //console.log(htmlbody);
 }
@@ -345,9 +346,9 @@ function showEachSpot1() {
 
         htmlbody = getSpotHtml1(htmlbody, i);
     }
-    if(lastTimeRank2 !== htmlbody){
+    if(lastTimeRank1 !== htmlbody){
         $("#rank-two").html(htmlbody);
-        lastTimeRank2 = htmlbody;
+        lastTimeRank1 = htmlbody;
     }
     //console.log(htmlbody);
 }
@@ -361,9 +362,9 @@ function showEachSpot3() {
 
         htmlbody = getSpotHtml3(htmlbody, i);
     }
-    if(lastTimeRank2 !== htmlbody){
+    if(lastTimeRank3 !== htmlbody){
         $("#rank-four").html(htmlbody);
-        lastTimeRank2 = htmlbody;
+        lastTimeRank3 = htmlbody;
     }
     //console.log(htmlbody);
 }
@@ -378,9 +379,9 @@ function showEachSpot2() {
 
         htmlbody = getSpotHtml2(htmlbody, i);
     }
-    if(lastTimeRank3 !== htmlbody){
-        $("#rank-five").html(htmlbody);
-        lastTimeRank3 = htmlbody;
+    if(lastTimeRank2 !== htmlbody){
+        $("#rank-three").html(htmlbody);
+        lastTimeRank2 = htmlbody;
     }
     //console.log(htmlbody);
 }
@@ -394,9 +395,9 @@ function showEachSpot4() {
 
         htmlbody = getSpotHtml4(htmlbody, i);
     }
-    if(lastTimeRank3 !== htmlbody){
-        $("#rank-three").html(htmlbody);
-        lastTimeRank3 = htmlbody;
+    if(lastTimeRank4 !== htmlbody){
+        $("#rank-five").html(htmlbody);
+        lastTimeRank4 = htmlbody;
     }
     //console.log(htmlbody);
 }