소스 검색

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

刘忠健 9 달 전
부모
커밋
2e2109d80e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 = [