1. Manuscript retrieval api of Gaode map
//city 表示搜索框前边的城市
//keyword 表示你搜索框中输入的字段
//result 为你需要的字段
AMap.plugin('AMap.Autocomplete', function(){
// 实例化Autocomplete
var autoOptions = {
//city 限定城市,默认全国
city: '全国'
}
var autoComplete= new AMap.Autocomplete(autoOptions);
autoComplete.search(keyword, function(status, result) {
// 搜索成功时,result即是对应的匹配数据
console.log(result);
})
})
Use better-scroll to achieve scrolling
cnpm install better-scroll --save
Add
ref="area_scroll" to the div you scroll,
and then the methods method
initScroll() { this.scroll = new BScroll(this.$refs.area_scroll, { click: true }); }, add initScroll to the place you want to scroll
To be continued. . .