Browse Source

经验值 改回 字符串输出

visuddhinanda 5 years ago
parent
commit
b4b8c2594c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/ucenter/active_get.php

+ 3 - 3
app/ucenter/active_get.php

@@ -21,10 +21,10 @@ if (isset($userid)) {
     $last = 0;
     while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
         $curr = $last + $row["duration"] / 3600000;
-        $output[] = array($row["date"], round($last, 3), round($curr, 3), round($last, 3), round($curr, 3), $row["hit"]);
+        $output[] = array($row["date"], number_format($last, 3, ".", ""), number_format($curr, 3, ".", ""), number_format($last, 3, ".", ""), number_format($curr, 3, ".", ""), $row["hit"]);
         $last = $curr;
     }
 
-    echo json_encode($output);
-    //echo str_replace('"','',$json);
+    $json = json_encode($output);
+    echo str_replace('"', '', $json);
 }