微信小程序之天气预报小程序天气预报的功能实现-小程序天气预报源代码-微信小程序开发天气预报
概述微信小程序项目实战之天气预报一、准备工作1、注册微信小程序微信注册:前往:https://mp.weixin.qq.com/选择小程序,点击注册申请AppID1.
2、注册微信小程序地图ak
2.打开开发工具—新建小程序—输入AppID(在微信平台的配置服务器中可查看)
3.注册百度地图API:http://lbsyun.baidu.com/填入基本信息——打开邮件中的链接——填写信息获得AK
4.二:上代码
5.wxml:
viewclass"hello"text{{weatherData}}/text/viewviewstyle"padding-top:30px"/viewblockwx:for"{{futureWeather}}"wx:key""viewstyle"border:1pxsolid#ccc;margin:5px"class"hello"view{{item.date}}/viewview{{item.temperature}}/viewview{{item.weather}}/viewview{{item.wind}}/view/view/block!--背景图--viewclass'ab'style'background-image:url("https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u2399728901,3084250506fm26gp0.jpg");'/view6.wxss:
.ab{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-99;background-color:#000;background-size:cover;}.hello{color:white;}7.js:
8.引用百度地图微信小程序JSAPI模块链接和提取码
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

