|
@@ -133,7 +133,7 @@ class Project extends Base_Controller {
|
|
|
$resData = request_post($url);
|
|
|
$arr = json_decode($resData,true);
|
|
|
if ($arr['code'] == 10000) {
|
|
|
- if ($arr['result']['HeWeather5'][0]['status'] == 'unknown location') {
|
|
|
+ if ($arr['result']['HeWeather5'][0]['status'] == 'unknown location' || $arr['result']['HeWeather5'][0]['status'] != 'ok') {
|
|
|
$url = 'https://free-api.heweather.net/s6/weather/forecast?location='.$res1['longitude'].','.$res1['latitude'].'&key=63dbc994630941fab269ad3c3af4d5d2';
|
|
|
// $url = 'https://way.jd.com/he/freeweather?city='.$res2['chinese_name'].'&appkey=a44fc7f907194098c69bb8e90003bca6';
|
|
|
$resData = request_post($url);
|