概述微信小程序项目实战之天气预报

一、准备工作

1、注册微信小程序

微信注册:前往:https://mp.weixin.qq.com/选择小程序,点击注册申请AppID

1.

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模块链接和提取码

TAG标签: 微信小程序之天气预报小程序天气预报的功能实现小程序天气预报源代码微信小程序开发天气预报

http://www.xiaochengxub.com/read-96875.html