Code Monkey home page Code Monkey logo

quietweather's Introduction

QuietWeather

一款天气应用微信小程序

说明

I、气象数据由百度地图开放平台修改为了和风天气,需要注册账号获取 key;免费版只能获取三天的天气数据,若要获取七天的气象数据,可以申请个人开发者认证;

II、d0e51c8 版本之后为小程序云开发版本,若未开通云开发功能,为不影响小程序正常运行,可以将版本号回退到 git reset d0e51c8 --hard,或,将云开发相关代码注释掉(包括:app.js 中的初始化、index.js 中获取 message 的代码)。若开通了云开发功能,可将相应代码部署到云上。

截图

数据来源

地理编码、天气数据均来自百度地图开放平台。个人开发完全免费,有对应的小程序 sdk,加入即可,但是返回的天气数据较少。

气象数据更换为了和风天气使用的是个人开发者认证版

运行前准备

  • 注册微信小程序,获取 appid,配置域名白名单(在小程序后台将使用到的 API 添加到域名白名单);
  • 注册百度地图开放平台开发者,创建应用 (注意:应用类型选择微信小程序时,请填写真实的小程序 appid) ,获取 ak(其他配置可自行查看);
  • 注册和风天气账号,获取 'key`;
  • app.js 中替换 globalData 中的 ak 为自己的 ak
  • app.js 中替换 globalData 中的 key 为你的 key
  • Run and Enjoy!

请喝咖啡

如果我的项目对你有帮助,可以请我喝杯咖啡噢~

支付宝

省事的可以先扫码领红包,然后扫支付宝将红包支付给我(商家)~

微信

转载请注明出处

quietweather's People

Contributors

myvin avatar

Watchers

 avatar

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.