<script src="http://api.map.baidu.com/api?v=2.0&ak=你申请的AK"></script> vue中使用 cityname(){ new BMap.LocalCity().get(res=>{ // alert(res.name); //城市名称 this.city = res.name; //赋值. }) },