Browse Source

修复:天气返回最高温度不带℃

刘忠健 9 months ago
parent
commit
2e2109d80e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/app/api/controller/Weather.php

+ 1 - 1
api/app/api/controller/Weather.php

@@ -65,7 +65,7 @@ class Weather extends Base
         foreach ($weather as $key => $value) {
         foreach ($weather as $key => $value) {
             //如果最高温度没包含℃,就加上
             //如果最高温度没包含℃,就加上
             if (!strpos($value["max"], "℃")) {
             if (!strpos($value["max"], "℃")) {
-                $weather[$key]["max"] = $weather[$key]["max"] . "℃";
+                $weather[$key]["max"] = $value["max"] . "℃";
             }
             }
         }
         }
         $res = [
         $res = [