Traditional Culture Encyclopedia - Weather inquiry - Why does appcan.request.get suddenly stop working?

Why does appcan.request.get suddenly stop working?

Please check whether the data returned by the interface can pass json verification. Our method is to call JSON.parse for conversion.

Function updateInfo (city, ele){

var weather URL = '/telematics/v3/weather? Location ='+City+'&; Output = JSON & AMPAK = htxrttggcljoomdf2Jzcc1yd';

app can . request . get JSON(weather URL,function(data){

if(data.error){

Alert ("Error in getting the weather");

} Otherwise {

var weatherData = data.results[0]。 Weather _ data;

var today = weather data[0];

$(ele)。 Find ('. lis-icon-s’)。 css('background-image ',' URL(" '+today . daypictureurl+'));

}

});

}

This is the test code for calling Baidu api, no problem. I also wrote a test demonstration in php. No problem. Php code:

& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)

echo“{ a”:“b”}”;

& gt