All Projects → BeijiYang → Cityselector

BeijiYang / Cityselector

微信小程序 城市/区县定位选择模块 汉字/拼音搜索 可直接使用 另附 mpvue 版本 city picker / auto positioning / auto complete

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Cityselector

Travelibrary
🐣流动图书馆微信小程序前端
Stars: ✭ 160 (-42.03%)
Mutual labels:  mina, wxapp
sea-ai
微信小程序 智能识别小程序 接入百度AI平台 基于wepy开发
Stars: ✭ 42 (-84.78%)
Mutual labels:  wxapp, wx
Leshare Shop Weapp
基于微信小程序的电商平台,采用原生框架开发
Stars: ✭ 183 (-33.7%)
Mutual labels:  mina, wxapp
Weapp One
ONE·一个|图文 微信小程序/开源代码
Stars: ✭ 295 (+6.88%)
Mutual labels:  mina, wxapp
cloudFns
微信小程序云函数合集
Stars: ✭ 34 (-87.68%)
Mutual labels:  wxapp, wx
Tina
💃 一款轻巧的渐进式微信小程序框架
Stars: ✭ 1,153 (+317.75%)
Mutual labels:  mina, wxapp
face-login-wx
人脸识别登录微信小程序
Stars: ✭ 77 (-72.1%)
Mutual labels:  wxapp, wx
Weixin Java Miniapp Demo
基于Spring Boot 和 WxJava 实现的微信小程序Java后端Demo
Stars: ✭ 779 (+182.25%)
Mutual labels:  wx, wxapp
taroCloud
记日常、GitHub trending资讯小程序 taro-hooks + rematch+云开发
Stars: ✭ 25 (-90.94%)
Mutual labels:  wxapp, wx
wxapp-storage
简单的微信小程序Storage相关的封装, 特点是安全的数据源, 有效的存储时间
Stars: ✭ 13 (-95.29%)
Mutual labels:  wxapp, wx
Wxdatabasedecryptkey
读取微信数据库聊天记录备份
Stars: ✭ 237 (-14.13%)
Mutual labels:  wx, wxapp
wx-ant-ble
微信、支付宝小程序BLE蓝牙SDK
Stars: ✭ 75 (-72.83%)
Mutual labels:  wxapp, wx
Weapp
🐧 微信小程序组件和功能封装,基于微信Component自定义组件开发
Stars: ✭ 235 (-14.86%)
Mutual labels:  wx, wxapp
Wechat Weapp Movie
🎬电影推荐 - 微信小程序
Stars: ✭ 1,355 (+390.94%)
Mutual labels:  mina, wxapp
Wxgame Threejs
Threejs 开发微信小游戏
Stars: ✭ 111 (-59.78%)
Mutual labels:  wx, wxapp
mina-touch
mina-touch,一个方便、轻量的小程序手势事件监听库
Stars: ✭ 112 (-59.42%)
Mutual labels:  mina, wx
wxfortune
运势小程序,使用canvas绘画图片,并保存图片
Stars: ✭ 79 (-71.38%)
Mutual labels:  wxapp, wx
Metro-Weapp
微信小程序-上海地铁Lite
Stars: ✭ 15 (-94.57%)
Mutual labels:  wxapp, wx
citySelector
🛳基于mpvue的微信小程序 城市/区县定位选择模块 汉字/拼音搜索 可直接使用 已更新
Stars: ✭ 52 (-81.16%)
Mutual labels:  wxapp, wx
weapp.request
为微信小程序提供的网络请求组件,是 wx.request 的扩展,基于 Promise API,添加缓存控制
Stars: ✭ 29 (-89.49%)
Mutual labels:  wxapp

微信小程序 城市/区县定位选择器 WeChat mini program city/county selector

主要功能

  • 自动定位 城市、区县(也支持手动重新定位)
  • 手动 汉字、拼音搜索 城市,支持搜索数量335个,覆盖地级市
  • 亦可通过 侧边栏 选择,城市按拼音首字母排列
  • 选择好城市后,自动显示 辖下区县

Features

  • Automatic positioning, or you can pick a city manually by the sidebar, the counties under the jurisdiction of it will be displayed
  • Search 335 cities across China, all prefecture-level cities included
  • Support Chinese character search & pinyin search
  • Support associative search

动图演示 / GIF Demonstration

在真机预览的画面是非常流畅的

lagging because of the screen recorder, running smoothly on mobile

image

说明

  • 使用(且小程序只能使用)腾讯地图的API
  • 将utils目录中,config.default.js文件改名为config.js
  • 并将其中的key改为自己的腾讯地图key(申请快速且免费)
  • ES6
  • 将模块集成到项目时,涉及到不同页面间数据通信的问题,见小程序页面间通信
  • 关于搜索框的实现,见小程序实现城市名称拼音搜索框 汉字/拼音
  • 关于搜索框的改进,见这一篇
  • 直接作为模块使用,如果对您有帮助,请star

更新

  • 实现了首页与城市选择页面之间的数据通信效果
  • 针对真机调试发现的,输入汉字时,输入法行为与开发环境不一致的问题,做了修改优化。
  • 针对定位模块在IOS中,侧面字母条的显示问题,进行了样式优化
  • 优化了demo样式
  • 升级了搜索功能,支持搜索335个城市(及相应级别地区)。截至目前,最新的国家统计局2016年统计年鉴中,地级市291个,地级行政区划334个。

mpvue 版本

Leon originalix 同学基于此项目写了 mpvue 版本(项目地址)。

使用 mpvue 的同学们可以参考。

mpvue version

Here is the mpvue version based on this project by Leon originalix.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].