Pārlūkot izejas kodu

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

刘忠健 9 mēneši atpakaļ
vecāks
revīzija
2e2109d80e
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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) {
             //如果最高温度没包含℃,就加上
             if (!strpos($value["max"], "℃")) {
-                $weather[$key]["max"] = $weather[$key]["max"] . "℃";
+                $weather[$key]["max"] = $value["max"] . "℃";
             }
         }
         $res = [