fix api
This commit is contained in:
parent
6a5920ce3f
commit
bee5fe6465
@ -168,9 +168,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="weather">
|
<div class="weather">
|
||||||
<span id="city_text">天气</span> <span
|
<span id="city_text">天气</span> <span
|
||||||
id="wea_text">加载失败</span> <span id="tem_night">*</span>°C~<span
|
id="wea_text">加载失败</span> <span id="tem_night">N/A</span>°C~<span
|
||||||
id="tem_day">*</span>°C <span id="win_text">风向</span><span
|
id="tem_day">N/A</span>°C <span id="win_text"></span><span
|
||||||
id="win_speed">*</span>
|
id="win_speed"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,7 +89,9 @@ fetch('https://v1.hitokoto.cn?max_length=24')
|
|||||||
.catch(console.error)
|
.catch(console.error)
|
||||||
|
|
||||||
//获取天气
|
//获取天气
|
||||||
fetch('https://www.yiketianqi.com/free/day?appid=47343665&appsecret=dABM2QxS&unescape=1')
|
//每日限量 100 次
|
||||||
|
//请前往 https://www.tianqiapi.com/ 申请(免费)
|
||||||
|
fetch('https://www.yiketianqi.com/free/day?appid=43986679&appsecret=TksqGZT7&unescape=1')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
$('#wea_text').text(data.wea)
|
$('#wea_text').text(data.wea)
|
||||||
|
Loading…
Reference in New Issue
Block a user