{"id":38895274,"url":"https://github.com/yuuk/vue-weather","last_synced_at":"2026-01-17T14:58:50.843Z","repository":{"id":21739605,"uuid":"93832869","full_name":"yuuk/vue-weather","owner":"yuuk","description":"vue-weather","archived":false,"fork":false,"pushed_at":"2022-12-10T22:41:36.000Z","size":1955,"stargazers_count":10,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T23:54:56.884Z","etag":null,"topics":["vue","weather","webpack"],"latest_commit_sha":null,"homepage":"http://m.caidianqu.com/weather/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-09T07:43:29.000Z","updated_at":"2023-03-08T12:32:22.000Z","dependencies_parsed_at":"2023-01-11T21:20:23.333Z","dependency_job_id":null,"html_url":"https://github.com/yuuk/vue-weather","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuuk/vue-weather","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuk%2Fvue-weather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuk%2Fvue-weather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuk%2Fvue-weather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuk%2Fvue-weather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuuk","download_url":"https://codeload.github.com/yuuk/vue-weather/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuk%2Fvue-weather/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28510928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vue","weather","webpack"],"created_at":"2026-01-17T14:58:50.178Z","updated_at":"2026-01-17T14:58:50.829Z","avatar_url":"https://github.com/yuuk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-weather\n一款基于vuejs+webpack构建的单页面简易天气查询webapp，适合新入坑vuejs的小伙伴们学习参考. :blush:\n\nDemo地址：[请戳这里~](http://m.caidianqu.com/weather/#/ \"请戳这里~\")\n\n或\n\n手机扫码：\n\n![](https://raw.githubusercontent.com/yuuk/vue-weather/master/screenshoot/qrcode.png)\n\n\n### 主要功能点如下：\n\n**1. 城市列表：**\n\n能自动获取当前城市，但是发现H5的地理位置API居然不支持非HTTPS环境，在本地调试使用127.0.0.1可以正常获取。\n\n![](https://raw.githubusercontent.com/yuuk/vue-weather/master/screenshoot/城市列表.jpg)\n\n**2. 删除城市：**\n\n![](https://raw.githubusercontent.com/yuuk/vue-weather/master/screenshoot/删除城市.jpg)\n\n**3. 搜索城市：**\n\n![](https://raw.githubusercontent.com/yuuk/vue-weather/master/screenshoot/搜索城市.jpg)\n\n**4. 天气详情：**\n\n![](https://raw.githubusercontent.com/yuuk/vue-weather/master/screenshoot/天气详情.jpg)\n\n### API来自心知天气  https://www.seniverse.com/doc\n\n需要注册账号申请自己的key，再根据api提供的签名验证方式生成签名，本项目中使用了 `crypto-js` 生成签名。\n```javascript\nimport crypto from 'crypto-js'\nlet ts = Math.round(new Date().getTime()/1000);\nlet ttl = 1800;\nlet uid = 'U8D906E800';\nlet key = 'bx2uy83sdyvvysg7';\nfunction createSig () {\n\tlet str = `ts=${ts}\u0026ttl=${ttl}\u0026uid=${uid}`;\n\treturn crypto.enc.Base64.stringify(crypto.HmacSHA1(str, key));\n}\nexport default {\n\tgetLocationUrl: 'https://api.seniverse.com/v3/location/search.json',\n\tgetWeatherUrl: 'https://api.seniverse.com/v3/weather/daily.json',\n\tgetNowWeather: 'https://api.seniverse.com/v3/weather/now.json',\n\twallpaperUrl: 'https://bing.ioliu.cn/v1/rand',\n\tkey: key,\n\tuid: uid,\n\tsig: createSig(),\n\tts: ts,\n\tttl: ttl\n}\n```\n\n### 图片API\n最初的想法是想找一个支持关键词查询的图片API，比如查看“深圳天气”就搜索深圳相关的图片。\n\n但是没有找到 :unamused: 才使用了 bing随机壁纸API https://github.com/xCss/bing/tree/v1.0.0\n\n### 技术栈\n- webpack\n- crypto-js\n- vuejs\n- vue-router\n- vue-jsonp\n- vue-awesome\n- sass\n- flexible.js\n\n### 灵感来源\nFramework7 天气案例 http://apps.framework7.cn/Weather7-Material/\n\nFramework7使用的是雅虎天气的API，个人觉得雅虎天气API使用太麻烦，所以选择了国内的心知天气……\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuuk%2Fvue-weather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuuk%2Fvue-weather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuuk%2Fvue-weather/lists"}