和风天气免费api(免费下载风和天气)

网友投稿 307 2023-01-30

本篇文章给大家谈谈和风天气免费api,以及免费下载风和天气对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 今天给各位分享和风天气免费api的知识,其中也会对免费下载风和天气进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

请问哪位大佬会前端的天气功能?

第一种:iframe方式嵌入

这个最简单,现在提供这样的调用API也很少了,其次是,因为是iframe嵌入,带来的不便就是样式不能改变,对方提供什么你用什么,样式配置都是在接口提供方。现在搜搜还是有这样的网站提供的。

第二种:免费api

这个很少相对也不稳定,但是为了学习也足够了。缺点就是,单纯的前端可能搞不定。因为API大部分提供是第三方网址,与前端项目存在跨域问题,可能需要后端配合中转一下。

第三种:付费API

这个跟免费一样,有可能存在跨域问题,有点就是相对稳定。

各类免费API推荐,再也不怕找不到免费API了

之前写了一个免费、稳定的天气预报API
https://www.jianshu.com/p/d878b5290c81
反响还不错,先把之前收集的其他类的免费API总结了一下,好东西是要大家一起分享的!

http://doc.tuling123.com/openapi2/263611

http://lbsyun.baidu.com/index.php?title=webapi

http://ai.baidu.com/
涵盖图像处理、自然语言、语音技术、知识图谱、数据智能、AR、视频技术和深度学习八大方面。看需选择即可。

http://www.faceplusplus.com.cn/
注:申请试用的API Key可以免费试用他上面的接口

手机号码归属地API接口: https://www.juhe.cn/docs/api/id/11
历史上的今天API接口: https://www.juhe.cn/docs/api/id/63
股票数据API接口: https://www.juhe.cn/docs/api/id/21
全国WIFI接口: https://www.juhe.cn/docs/api/id/18
星座运势接口: https://www.juhe.cn/docs/api/id/58
黄金数据接口: https://www.juhe.cn/docs/api/id/29
语音识别接口: https://www.juhe.cn/docs/api/id/134
周公解梦接口: https://www.juhe.cn/docs/api/id/64
天气预报API接口: https://www.juhe.cn/docs/api/id/73
身份证查询API接口: https://www.juhe.cn/docs/api/id/38
笑话大全API接口: https://www.juhe.cn/docs/api/id/95
邮编查询接口: https://www.juhe.cn/docs/api/id/66
老黄历接口: https://www.juhe.cn/docs/api/id/65
网站安全检测接口: https://www.juhe.cn/docs/api/id/19
手机固话来电显示接口: https://www.juhe.cn/docs/api/id/72
基金财务数据接口: https://www.juhe.cn/docs/api/id/28
成语词典接口: https://www.juhe.cn/docs/api/id/157
新闻头条接口: https://www.juhe.cn/docs/api/id/235
IP地址接口: https://www.juhe.cn/docs/api/id/1
问答机器人接口: https://www.juhe.cn/docs/api/id/112
汇率API接口: https://www.juhe.cn/docs/api/id/80
电影票房接口: https://www.juhe.cn/docs/api/id/44
万年历API接口: https://www.juhe.cn/docs/api/id/177
NBA赛事接口: https://www.juhe.cn/docs/api/id/92

https://developers.douban.com/wiki/?title=guide

淘宝开放平台 http://open.taobao.com/?spm=a219a.7395905.1.1.YdFDV6

微博开放平台 http://open.weibo.com/wiki/API

讯飞语音 http://www.xfyun.cn/robots/solution
马化腾的微信开放平台(对应的还有腾讯开放平台)
https://open.weixin.qq.com/
融云IM https://developer.rongcloud.cn/signin?returnUrl=%2Fapp%2Fappkey%2FPv4vYQwaxSZdfpLX5AI%3D
高德地图 http://lbs.amap.com/

国内有哪些城市较完整可以免费使用的天气 API 接口

因微信公共号提供城市天气预报服务,发现网山天气预报接口和环境数据接口方面资料比较乱,而且有不少内容已经失效,下面内容由过程日志整理形成,希望可用得上。
一 天气预报
国内的天气预报数据,主要是国家气象局和国外两个来源(指数据来源)。
国外方面主要是雅虎(XML格式,谷歌已经停掉了自家的天气API);
国内数据由国家气象局提供(JSON格式)。
在知乎看到过一篇专业人士评论,雅虎可以提供全球范围的且非常精细的天气数据(小时级更新),但主要是通过计算机自动生成。而国家气象局则是各地经验丰富的专家人士结合计算机综合分析得出,在准确性上更胜一筹。我就这样信了!
国家气象局接口资源及用法
气象局的天气预报主页:移动版普通版 ,仔细挖掘这两个地址可以发现很多好东西哦。
特点:接口多,来自weather.com.cn和mobile.weather.com.cn都有,次数不限制,服务稳定,功能全面,优先推荐。
1. 实时天气接口
有多个接口,好像差别不大:
实时天气1:http://www.weather.com.cn/data/sk/101190408.html
实时天气2:http://www.weather.com.cn/data/cityinfo/101190408.html
实时天气3(带时间戳):http://mobile.weather.com.cn/data/sk/101010100.html?_=1381891661455
2. 一周天气预报接口
7天预报数据 URL: http://mobile.weather.com.cn/data/forecast/101010100.html?_=1381891660081
该接口来源气象局移动版网站,目测数据最为精确,详细接口格式如下:
{"c":{"c1":"101010100","c2":"beijing","c3":"北京","c4":"beijing","c5":"北京","c6":"beijing","c7":"北京","c8":"china","c9":"中国","c10":"1","c11":"010","c12":"100000","c13":"116.391","c14":"39.904","c15":"33","c16":"AZ9010","c17":"+8"},
"f":{"f1":
[
{"fa":"01","fb":"03","fc":"10","fd":"5","fe":"0","ff":"0","fg":"0","fh":"0","fi":"06:21|17:40"},
{"fa":"07","fb":"07","fc":"19","fd":"12","fe":"0","ff":"0","fg":"0","fh":"0","fi":"06:22|17:38"},
{"fa":"02","fb":"00","fc":"15","fd":"5","fe":"8","ff":"8","fg":"3","fh":"1","fi":"06:23|17:37"},
{"fa":"00","fb":"00","fc":"16","fd":"4","fe":"0","ff":"0","fg":"0","fh":"0","fi":"06:24|17:35"},
{"fa":"00","fb":"00","fc":"18","fd":"7","fe":"0","ff":"0","fg":"0","fh":"0","fi":"06:25|17:34"},
{"fa":"00","fb":"01","fc":"18","fd":"8","fe":"0","ff":"0","fg":"0","fh":"0","fi":"06:26|17:32"},
{"fa":"01","fb":"01","fc":"16","fd":"6","fe":"0","ff":"0","fg":"0","fh":"0","fi":"06:27|17:31"}],
"f0":"201310121100"}}
详细接口分析如下:
//格式说明
var format={fa:图片1,fb:图片2,fc:温度1,fd:温度2,fe:风向1,ff:风向2,fg:风力1,fh:风力2,fi:日出日落};
//定义天气类型
var weatherArr={"00":"晴","01":"多云","02":"阴","03":"阵雨","04":"雷阵雨","05":"雷阵雨伴有冰雹","06":"雨夹雪","07":"小雨","08":"中雨","09":"大雨","10":"暴雨","11":"大暴雨","12":"特大暴雨","13":"阵雪","14":"小雪","15":"中雪","16":"大雪","17":"暴雪","18":"雾","19":"冻雨","20":"沙尘暴","21":"小到中雨","22":"中到大雨","23":"大到暴雨","24":"暴雨到大暴雨","25":"大暴雨到特大暴雨","26":"小到中雪","27":"中到大雪","28":"大到暴雪","29":"浮尘","30":"扬沙","31":"强沙尘暴","53":"霾","99":""};
//定义风向数组
var fxArr={"0":"无持续风向","1":"东北风","2":"东风","3":"东南风","4":"南风","5":"西南风","6":"西风","7":"西北风","8":"北风","9":"旋转风"};
//定义风力数组
var flArr={"0":"微风","1":"3-4级","2":"4-5级","3":"5-6级","4":"6-7级","5":"7-8级","6":"8-9级","7":"9-10级","8":"10-11级","9":"11-12级"};
6天预报数据 URL: http://m.weather.com.cn/data/101190408.html
该接口来源网络,应该是一个流传比较久的接口,大发现准确性和稳定性可能不稳定。接口分析如下:
{"weatherinfo":{
#基本信息
"city":"北京","city_en":"beijing","date_y":"2013年9月24日","date":"","week":"星期二","fchh":"11","cityid":"101010100",
#6天温度范围
"temp1":"22℃~11℃","temp2":"25℃~11℃","temp3":"26℃~13℃","temp4":"25℃~15℃","temp5":"25℃~16℃","temp6":"24℃~16℃",
#6天温度范围(华氏)
"tempF1":"71.6℉~51.8℉","tempF2":"77℉~51.8℉","tempF3":"78.8℉~55.4℉","tempF4":"77℉~59℉","tempF5":"77℉~60.8℉","tempF6":"75.2℉~60.8℉",
#6天天气
"weather1":"多云转晴","weather2":"晴","weather3":"晴","weather4":"晴转多云","weather5":"阴转阵雨","weather6":"多云",
#6天天气图示(每天2张)
"img1":"1","img2":"0","img3":"0","img4":"99","img5":"0","img6":"99","img7":"0","img8":"1","img9":"2","img10":"3","img11":"1","img12":"99",
"img_single":"1",
#6天天气图示文字(每天2)
"img_title1":"多","img_title2":"晴","img_title3":"晴","img_title4":"晴","img_title5":"晴","img_title6":"晴","img_title7":"晴","img_title8":"多云","img_title9":"阴","img_title10":"阵雨","img_title11":"多云","img_title12":"多云",
"img_title_single":"多云",
#6天风
"wind1":"北风3-4级转微风","wind2":"微风","wind3":"微风","wind4":"微风","wind5":"微风","wind6":"微风",
"fx1":"北风","fx2":"微风",
#6天风力情况
"fl1":"3-4级转小于3级","fl2":"小于3级","fl3":"小于3级","fl4":"小于3级","fl5":"小于3级","fl6":"小于3级",
#24小时内
"index":"较冷","index_d":"建议着大衣、呢外套加毛衣、卫衣等服装。体弱者宜着厚外套、厚毛衣。因昼夜温差较大,注意增减衣服。",
#48小时内
"index48":"较舒适","index48_d":"建议着薄外套或牛仔衫裤等服装。年老体弱者宜着夹克衫、薄毛衣等。昼夜温差较大,注意适当增减衣服。",
#紫外 洗车 旅游 舒适指数 晨练 晾晒 过敏
"index_uv":"弱",
"index48_uv":"强",
"index_xc":"适宜",
"index_tr":"适宜",
"index_co":"舒",
"st1":"21","st2":"12","st3":"24","st4":"12","st5":"25","st6":"14", #不明
"index_cl":"较适宜",
"index_ls":"适宜",
"index_ag":"极易发"
}}

免费的天气预报Api有哪些

上聚合数据、百度API上找啊,一般申请一个帐号,天气这种api都有送次数的
也有免费无次数的,如:http://flash.weather.com.cn/wmaps/xml/chongqing.xml
求采纳。

uni-app踩坑笔记

1.两个普通页面之间和风天气免费api的跳转用uni.navgateTo()和风天气免费api,url可携带参数。
2.普通页面跳tabbar配置过和风天气免费api的页面需要uni.switchTab()和风天气免费api,url不能传值。
3.uni.reLaunch()万金油跳转和风天气免费api,可以跳转任何页面(克服了普通页面跳tabbar配置的页面url不能传值的问题。)
4.突出中间按钮的midButton,是偶数才能显示,但只支持真机环境,浏览器是没有效果的。

6.页面生命周期(考虑的是页面刷新带来的影响):
onLoad、onShow、onReady
应用生命周期,指app.vue里面的这三个

7.箭头函数没有this指向(慎用),如果在控制台打印this是undefined的,证明是箭头函数在作怪,在特殊场合别贪方便,有时候会遇到抓破头皮也找不到问题所在,就是箭头函数搞的鬼。

8.uni.request({,success:function(res){})})请求成功返回的数据直接使用this直接赋值是不生效的,因为这是一个异步函数,需要借助一个指向:let that = this

9.setStorageSync 数据缓存是用来2个页面交互的,传数据传值,写在onLoad里面。
10.uni-app的<view标签等于div标签,独占一行。

5.和风天气官网提供的API是免费的,每人一天1000次数,够练手了。

关于和风天气免费api和免费下载风和天气的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。 和风天气免费api的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于免费下载风和天气、和风天气免费api的信息别忘了在本站进行查找喔。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:比较便宜的话费充值api(话费那里充值比较便宜)
下一篇:话费充值api(话费充值api平台)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~