用JS生成天气推送代码
2024-06-05javascript hljs复制代码// 获取天气数据 fetch('http://api.weatherapi.com/v1/current.json?key=your_api_key&q=city_name') .then(response => response.json()) .then(data => { weatherData = data.current; // 构建天气推送 const weatherMessage = `当前天气:${weatherData.condition.text},温度:${w