Giter VIP home page Giter VIP logo

weatherwechat's Introduction

WeatherWeChat

GIF展示

Image

代码逻辑

微信程序,逻辑层与页面层,主要由逻辑js,公共设置json,页面逻辑wxml,样式表wxss文件组成。

框架:数据获取,数据存储,数据显示。

城市查询页面:

通过require获取城市的json数据,处理之后显示(省市区),收藏的城市保存在本地缓存。当搜索出已收藏的城市时,显示其为选中状态。

天气显示页面:

从本地缓存读取收藏城市,更加城市名与ID访问。

并发问题处理:微信小程序最多5个,所以采用逐一请求,完成一个之后,在completed方法中继续执行下一个请求,直到满足停止条件

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.