其他分享
首页 > 其他分享> > 根据位置经纬度获取温度天气风向API

根据位置经纬度获取温度天气风向API

作者:互联网

// 获取天气状态

getWeather: function () {
  var _this = this;
  $.ajax("https://devapi.qweather.com/v7/weather/now?location=105.148371,25.370256&key=a580a69c104d4fcc9d446cdfdc3c2632", {
    type: "get",
    dataType: "json",
    success: function (result) {
      if (result.code === "200") {
        localStorage.setItem("weather", JSON.stringify(result));
    },
  });
},

标签:function,code,经纬度,天气,获取,weather,result,风向,API
来源: https://www.cnblogs.com/songkomei/p/16696209.html