Skip to content

Commit

Permalink
fix api
Browse files Browse the repository at this point in the history
  • Loading branch information
底层用户 committed Mar 17, 2022
1 parent 6a5920c commit bee5fe6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@
</div>
<div class="weather">
<span id="city_text">天气</span>&nbsp;<span
id="wea_text">加载失败</span>&nbsp;<span id="tem_night">*</span>°C~<span
id="tem_day">*</span>°C&nbsp;<span id="win_text">风向</span><span
id="win_speed">*</span>
id="wea_text">加载失败</span>&nbsp;<span id="tem_night">N/A</span>°C~<span
id="tem_day">N/A</span>°C&nbsp;<span id="win_text"></span><span
id="win_speed"></span>
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ fetch('https://v1.hitokoto.cn?max_length=24')
.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(data => {
$('#wea_text').text(data.wea)
Expand Down

1 comment on commit bee5fe6

@vercel
Copy link

@vercel vercel bot commented on bee5fe6 Mar 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.