微信小程序实战—实现城市列表的选择

##微信小程序实战—实现城市列表的选择
####实现效果预览
微信小程序实战—实现城市列表的选择_第1张图片
微信小程序实战—实现城市列表的选择_第2张图片

####实现功能简介

  • 城市的选择
  • 中文/拼音/首字母条件搜索
  • 按首字字母快速定位到城市位置

####目录结构
微信小程序实战—实现城市列表的选择_第3张图片

####主要代码
####app.js
App({
globalData: {
trainBeginCity: ‘杭州’,
trainEndCity: ‘北京’
}
})
####app.json
{
“pages”:[
“pages/index/index”,
“pages/citys/citys”
],
“window”:{
“backgroundTextStyle”:“light”,
“navigationBarBackgroundColor”: “#fff”,
“navigationBarTitleText”: “WeChat”,
“navigationBarTextStyle”:“black”,
“enablePull

你可能感兴趣的:(小程序)