微信程序,逻辑层与页面层,主要由逻辑js,公共设置json,页面逻辑wxml,样式表wxss文件组成。
框架:数据获取,数据存储,数据显示。
城市查询页面:
通过require获取城市的json数据,处理之后显示(省市区),收藏的城市保存在本地缓存。当搜索出已收藏的城市时,显示其为选中状态。
天气显示页面:
从本地缓存读取收藏城市,更加城市名与ID访问。
并发问题处理:微信小程序最多5个,所以采用逐一请求,完成一个之后,在completed方法中继续执行下一个请求,直到满足停止条件
天气查询 微信小程序
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.